{\rtf1\ansi\ansicpg1252
{\fonttbl
{\f1\fnil\fcharset0\fprq0 Arial;}
}
{\colortbl;
\red105\green0\blue83;
\red0\green0\blue0;
\red187\green224\blue227;
\red204\green51\blue153;
\red165\green0\blue33;
\red0\green0\blue255;
}
{\stylesheet
{\s1\li540\fi-540\fs64\lang2058\level1 heading 1;}
{\s2\li1170\fi-450\fs56\lang2058\level2 heading 2;}
{\s3\li1800\fi-360\fs48\lang2058\level3 heading 3;}
{\s4\li2520\fi-360\fs40\lang2058\level4 heading 4;}
{\s5\li3240\fi-360\fs40\lang2058\level5 heading 5;}
{\s6\li3960\fi-360\fs40\lang2058\level6 heading 6;}
{\s7\li4680\fi-360\fs40\lang2058\level7 heading 7;}
{\s8\li5400\fi-360\fs40\lang2058\level8 heading 8;}
{\s9\li6120\fi-360\fs40\lang2058\level9 heading 9;}
}
\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1 Welcome to Genero Language Basics}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Course Agenda}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\ul\f1\fs12\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\ul\f1\fs28\cf1\lang1033 DAY 1:\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs28\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033 CHAPTER 1: }{\b\f1\fs24\cf1\lang1033 Genero}{\b\f1\fs24\cf1\lang1033  BDL Concepts\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033        TOPICS:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -BDL Overview\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -The Language\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -The User Interface\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -Compiling a }{\f1\fs24\cf2\lang1033 Genero}{\f1\fs24\cf2\lang1033  BDL Application\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -Deploying a }{\f1\fs24\cf2\lang1033 Genero}{\f1\fs24\cf2\lang1033  BDL Application\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -Resources for the Programmer\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs28\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033 CHAPTER 2: Using }{\b\f1\fs24\cf1\lang1033 Genero}{\b\f1\fs24\cf1\lang1033  BDL\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033         TOPICS:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -A simple BDL Program\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -The connect to Database Program\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs28\cf2\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033 CHAPTER 3: Record Display\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs24\cf1\lang1033         TOPICS:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang1033 -Interacting with the User\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang3082 -}{\f1\fs24\cf2\lang3082 Working}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 with}{\f1\fs24\cf2\lang3082  Records and }{\f1\fs24\cf2\lang3082 Forms}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang3082 -}{\f1\fs24\cf2\lang3082 The}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 Form}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 Specification}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 File}{\f1\fs24\cf2\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs24\cf2\lang3082 -}{\f1\fs24\cf2\lang3082 Compiling}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 the}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2\lang3082 Program}{\f1\fs24\cf2\lang3082  and }{\f1\fs24\cf2\lang3082 Form}{\f1\fs28\cf2\lang3082  }{\f1\fs28\cf2\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs28\cf2\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs28\cf2\lang1033 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Course Logistics}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Trainer}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Introductions}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Student Information}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1033 Complete Name\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1033 Company Name\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1033 Experience\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 i4GL / 4GLs\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Four Js\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Web Technologies: html, xml, web services, etc\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Other languages\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1033 Course Expectation\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Important Information}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\f1\fs40\cf1\lang1033 Support centers & Four Js Company\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Four Js Development Tools Latinoam\'e9rica\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 EUA\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 France & development\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 England\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Australia\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 Spain}{\b\f1\fs36\cf3\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\f1\fs40\cf1\lang1033 Support account\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\ul\f1\fs36\cf2\lang1033 soporte@4js.com}{\b\f1\fs36\cf2\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\f1\fs40\cf1\lang1033 Support by web\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\ul\f1\fs36\cf2\lang1033 http://latin.4js.com}{\b\f1\fs36\cf2\lang1033  > Soporte}{\b\f1\fs36\cf3\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\f1\fs40\cf1\lang1033 Support by phone\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang1033 + 52 (55) 56 66 87 34}{\b\f1\fs36\cf3\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\f1\fs40\cf1\lang1033 Support on site\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 1: }{\b\f1\fs48\cf1\lang1033 Genero}{\b\f1\fs48\cf1\lang1033  BDL Concepts\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 BDL Overview}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 chapter}{\b\f1\fs40\cf1\lang3082  introduces }{\b\f1\fs40\cf1\lang3082 the}{\b\f1\fs40\cf1\lang3082  Genero Business }{\b\f1\fs40\cf1\lang3082 Development}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 Language}{\b\f1\fs40\cf1\lang3082  (BDL).}{\b\f1\fs40\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1033 Genero}{\b\f1\fs40\cf1\lang1033  }{\b\f1\fs40\cf1\lang1033 Overwiew}{\b\f1\fs40\cf1\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 typically}{\f1\fs36\cf2\lang3082  use Genero }{\f1\fs36\cf2\lang3082 to}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 build}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 an}{\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 interactive}{\i\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 database}{\i\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 application}{\f1\fs36\cf2\lang3082 , a }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 that}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 handles}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 interaction}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 between}{\f1\fs36\cf2\lang3082  a }{\f1\fs36\cf2\lang3082 user}{\f1\fs36\cf2\lang3082  and a }{\f1\fs36\cf2\lang3082 database}{\f1\fs36\cf2\lang3082 . }{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 database}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 schema}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 that}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 organizes}{\f1\fs36\cf2\lang3082  data }{\f1\fs36\cf2\lang3082 into}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 relational}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 tables}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 gives}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 shape}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 to}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 one}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 side}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082 . }{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 needs}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 your}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 user}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 shape}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 other}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 side}{\f1\fs36\cf2\lang3082 . }{\f1\fs36\cf2\lang3082 You}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 write}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 logic}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 that}{\f1\fs36\cf2\lang3082  bridges }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  gap }{\f1\fs36\cf2\lang3082 between}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 them}{\f1\fs36\cf2\lang3082 . }{\f1\fs36\cf2\lang3082 You}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 express}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 logic}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 your}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 application}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 with}{\f1\fs36\cf2\lang3082  Genero BDL }{\f1\fs36\cf2\lang3082 statements}{\f1\fs36\cf2\lang3082  in }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 source}{\f1\fs36\cf2\lang3082  files }{\f1\fs36\cf2\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 The Language}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang1034 The}{\b\f1\fs36\cf1\lang1034  }{\b\f1\fs36\cf1\lang1034 Language}{\b\f1\fs36\cf1\lang1034 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Genero BDL }{\f1\fs32\cf2\lang3082 is}{\f1\fs32\cf2\lang3082  a }{\f1\fs32\cf2\lang3082 high-level}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 fourth}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 generation}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 language}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 with}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 an}{\f1\fs32\cf2\lang3082  open, }{\f1\fs32\cf2\lang3082 readable}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 syntax}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 encouraging}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 an}{\f1\fs32\cf2\lang3082  individual }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 group}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 programming}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 style}{\f1\fs32\cf2\lang3082 . }{\f1\fs32\cf2\lang3082 You}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 write}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 your}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 logic}{\f1\fs32\cf2\lang3082  in }{\f1\fs32\cf2\lang3082 text}{\f1\fs32\cf2\lang3082  files, }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  }{\i\f1\fs32\cf2\lang3082 program}{\i\f1\fs32\cf2\lang3082  }{\i\f1\fs32\cf2\lang3082 source}{\i\f1\fs32\cf2\lang3082  modules}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 which}{\f1\fs32\cf2\lang3082  are }{\f1\fs32\cf2\lang3082 compiled}{\f1\fs32\cf2\lang3082  and }{\f1\fs32\cf2\lang3082 linked}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 into}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 programs}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 that}{\f1\fs32\cf2\lang3082  can }{\f1\fs32\cf2\lang3082 be}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 executed}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 by}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 Runtime}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 system}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\ul\f1\fs28\cf2\lang3082 Displaying}{\b\ul\f1\fs28\cf2\lang3082  Data }{\b\ul\f1\fs28\cf2\lang3082 to}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 the}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 User}{\b\ul\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\ul\f1\fs28\cf2\lang3082 Entering}{\b\ul\f1\fs28\cf2\lang3082  and }{\b\ul\f1\fs28\cf2\lang3082 Changing}{\b\ul\f1\fs28\cf2\lang3082  Data}{\ul\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\ul\f1\fs28\cf2\lang3082 Searching}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 the}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 Database}{\b\ul\f1\fs28\cf2\lang3082  (}{\b\ul\f1\fs28\cf2\lang3082 Querying}{\b\ul\f1\fs28\cf2\lang3082 )\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\ul\f1\fs28\cf2\lang3082 Responding}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 to}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 User}{\b\ul\f1\fs28\cf2\lang3082  }{\b\ul\f1\fs28\cf2\lang3082 Actions}{\ul\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Displaying}{\b\f1\fs36\cf1\lang3082  Data }{\b\f1\fs36\cf1\lang3082 to}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 the}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 User}{\b\f1\fs36\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 In Genero, }{\f1\fs32\cf2\lang3082 programs}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 manipulate}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 Window}{\f1\fs32\cf2\lang3082  and }{\f1\fs32\cf2\lang3082 Form}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 objects}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  define }{\f1\fs32\cf2\lang3082 display}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 areas}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 statements}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 within}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 your}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The}{\f1\fs32\cf2\lang3082  OPEN WINDOW }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 creates}{\f1\fs32\cf2\lang3082  and opens a new }{\f1\fs32\cf2\lang3082 window}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 on}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user's}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 screen}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 With}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  OPEN WINDOW ... WITH FORM }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 you}{\f1\fs32\cf2\lang3082  open a }{\f1\fs32\cf2\lang3082 window}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 on}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 screen}{\f1\fs32\cf2\lang3082 , load a }{\f1\fs32\cf2\lang3082 compiled}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 form}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 from}{\f1\fs32\cf2\lang3082  disk }{\f1\fs32\cf2\lang3082 into}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 memory}{\f1\fs32\cf2\lang3082 , and }{\f1\fs32\cf2\lang3082 make}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 it}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 ready}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  use \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Use }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  DISPLAY }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 display}{\f1\fs32\cf2\lang3082  data in a record in a }{\f1\fs32\cf2\lang3082 form}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Use }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  DISPLAY ARRAY }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 allow}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 view}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 contents}{\f1\fs32\cf2\lang3082  of }{\f1\fs32\cf2\lang3082 an}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 array}{\f1\fs32\cf2\lang3082  of records }{\f1\fs32\cf2\lang1034 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 The Language}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Entering}{\b\f1\fs36\cf1\lang3082  and }{\b\f1\fs36\cf1\lang3082 Changing}{\b\f1\fs36\cf1\lang3082  Data }{\b\f1\fs36\cf1\lang1034 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The}{\f1\fs32\cf2\lang3082  INPUT }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 is}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 an}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  (}{\f1\fs32\cf2\lang3082 dialog}{\f1\fs32\cf2\lang3082 ) }{\f1\fs32\cf2\lang3082 that}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 enables}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 fields}{\f1\fs32\cf2\lang3082  in a }{\f1\fs32\cf2\lang3082 form}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  input, }{\f1\fs32\cf2\lang3082 waits}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 while}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 types}{\f1\fs32\cf2\lang3082  data }{\f1\fs32\cf2\lang3082 into}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 fields}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 automatically}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 assign}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  data }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  variables, and }{\f1\fs32\cf2\lang3082 proceeds}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 after}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 accepts}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 cancels}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 dialog}{\f1\fs32\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Searching}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 the}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 Database}{\b\f1\fs36\cf1\lang3082  (}{\b\f1\fs36\cf1\lang3082 Querying}{\b\f1\fs36\cf1\lang3082 ) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Genero BDL }{\f1\fs32\cf2\lang3082 lets}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 you}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 accept}{\f1\fs32\cf2\lang3082  input }{\f1\fs32\cf2\lang3082 from}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  in }{\f1\fs32\cf2\lang3082 multiple}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 ways}{\f1\fs32\cf2\lang3082 . }{\f1\fs32\cf2\lang3082 Instead}{\f1\fs32\cf2\lang3082  of literal }{\f1\fs32\cf2\lang3082 values}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 process}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  can }{\f1\fs32\cf2\lang3082 enter}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 search}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 criteria}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  a }{\f1\fs32\cf2\lang3082 query}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  CONSTRUCT }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 allows}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 enter}{\f1\fs32\cf2\lang3082  a }{\f1\fs32\cf2\lang3082 value}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  a }{\f1\fs32\cf2\lang3082 range}{\f1\fs32\cf2\lang3082  of }{\f1\fs32\cf2\lang3082 values}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 for}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 one}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 several}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 form}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 fields}{\f1\fs32\cf2\lang3082 ,\'a0 and }{\f1\fs32\cf2\lang3082 your}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  looks up }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 database}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 rows}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 that}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 satisfy}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 requirements}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Responding}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 to}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 User}{\b\f1\fs36\cf1\lang3082  }{\b\f1\fs36\cf1\lang3082 Actions}{\b\f1\fs36\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 An}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 action}{\f1\fs32\cf2\lang3082  (a set of }{\f1\fs32\cf2\lang3082 instructions}{\f1\fs32\cf2\lang3082 ) can }{\f1\fs32\cf2\lang3082 be}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 defined}{\f1\fs32\cf2\lang3082  and }{\f1\fs32\cf2\lang3082 triggered}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 by}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 user}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Graphical}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 objects}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 on}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 application}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 window}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 such}{\f1\fs32\cf2\lang3082  as }{\f1\fs32\cf2\lang3082 buttons}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 toolbars}{\f1\fs32\cf2\lang3082 , and }{\f1\fs32\cf2\lang3082 pulldown}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 menus}{\f1\fs32\cf2\lang3082  (}{\f1\fs32\cf2\lang3082 known}{\f1\fs32\cf2\lang3082  as }{\i\f1\fs32\cf2\lang3082 action}{\i\f1\fs32\cf2\lang3082  }{\i\f1\fs32\cf2\lang3082 views}{\i\f1\fs32\cf2\lang3082 ),}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 correspond}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 actions}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 defined}{\f1\fs32\cf2\lang3082  in }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 In }{\f1\fs32\cf2\lang3082 your}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 program}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  MENU }{\f1\fs32\cf2\lang3082 statement}{\f1\fs32\cf2\lang3082 , }{\f1\fs32\cf2\lang3082 or}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  ON ACTION }{\f1\fs32\cf2\lang3082 clause}{\f1\fs32\cf2\lang3082  of }{\f1\fs32\cf2\lang3082 interactive}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 instructions}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 such}{\f1\fs32\cf2\lang3082  as INPUT, INPUT ARRAY, CONSTRUCT and DISPLAY ARRAY, define }{\f1\fs32\cf2\lang3082 the}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 list}{\f1\fs32\cf2\lang3082  of }{\f1\fs32\cf2\lang3082 actions}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 that}{\f1\fs32\cf2\lang3082  can }{\f1\fs32\cf2\lang3082 be}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 triggered}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 The User Interface}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang1034 This}{\b\f1\fs40\cf1\lang1034  }{\b\f1\fs40\cf1\lang1034 topic}{\b\f1\fs40\cf1\lang1034  }{\b\f1\fs40\cf1\lang1034 Discusses}{\b\f1\fs40\cf1\lang1034 :\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 Designing}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 Forms}{\b\ul\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 The}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 Abstract}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 User}{\b\ul\f1\fs32\cf2\lang3082  Interface }{\b\ul\f1\fs32\cf2\lang3082 Tree}{\b\ul\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 Programming}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 the}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 Abstract}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 User}{\b\ul\f1\fs32\cf2\lang3082  Interface}{\ul\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Designing}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 Forms}{\b\f1\fs40\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Forms}{\f1\fs36\cf2\lang3082  are portable }{\f1\fs36\cf2\lang3082 across}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 applications}{\f1\fs36\cf2\lang3082  and }{\f1\fs36\cf2\lang3082 platforms}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  XML-}{\f1\fs36\cf2\lang3082 based}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 application}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 screen}{\f1\fs36\cf2\lang3082  can }{\f1\fs36\cf2\lang3082 be}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 defined}{\f1\fs36\cf2\lang3082  in }{\f1\fs36\cf2\lang3082 form}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 specification}{\f1\fs36\cf2\lang3082  files: }{\f1\fs36\cf2\lang3082 Since}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 form}{\f1\fs36\cf2\lang3082  files are }{\f1\fs36\cf2\lang3082 separate}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 from}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 other}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 parts}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 your}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 Runtime}{\i\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 Form}{\i\f1\fs36\cf2\lang3082  Files}{\f1\fs36\cf2\lang3082  can }{\f1\fs36\cf2\lang3082 be}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 used}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 with}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 different}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 programs}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 arrangement}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 fields}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 labels}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 other}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 form}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 objects}{\f1\fs36\cf2\lang3082 , and }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 behavior}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 form}{\f1\fs36\cf2\lang3082  as }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 user}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 presses}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 different}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 keys}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 or}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 buttons}{\f1\fs36\cf2\lang3082 , and }{\f1\fs36\cf2\lang3082 selects}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 different}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 menu}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 options}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 creates}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 personality}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 program}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You}{\f1\fs36\cf2\lang3082  can }{\f1\fs36\cf2\lang3082 design}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 your}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 form}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 to}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 group}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 objects}{\f1\fs36\cf2\lang3082  in horizontal and vertical boxes, }{\f1\fs36\cf2\lang3082 display}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 it}{\f1\fs36\cf2\lang3082  as a folder of }{\f1\fs36\cf2\lang3082 pages}{\f1\fs36\cf2\lang3082 , and use }{\f1\fs36\cf2\lang3082 menus}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 toolbars}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 or}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 buttons}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 to}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 trigger}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 actions}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You}{\f1\fs36\cf2\lang3082  define }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 application}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 screens}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 or}{\i\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 forms}{\f1\fs36\cf2\lang3082 , in }{\i\f1\fs36\cf2\lang3082 Form}{\i\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 Specification}{\i\f1\fs36\cf2\lang3082  Files,}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 created}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 using}{\f1\fs36\cf2\lang3082  a }{\f1\fs36\cf2\lang3082 text}{\f1\fs36\cf2\lang3082  editor \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 The User Interface}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 Abstract}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 User}{\b\f1\fs40\cf1\lang3082  Interface }{\b\f1\fs40\cf1\lang3082 Tree}{\b\f1\fs40\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  Genero }{\f1\fs36\cf2\lang3082 Runtime}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 System}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 creates}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 Abstract}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 User}{\f1\fs36\cf2\lang3082  Interface }{\f1\fs36\cf2\lang3082 tree}{\f1\fs36\cf2\lang3082 , and }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  Genero }{\f1\fs36\cf2\lang3082 Client}{\f1\fs36\cf2\lang3082  (}{\f1\fs36\cf2\lang3082 front}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 end}{\f1\fs36\cf2\lang3082 ) }{\f1\fs36\cf2\lang3082 makes}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 this}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 abstract}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 tree}{\f1\fs36\cf2\lang3082  visible }{\f1\fs36\cf2\lang3082 on}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 screen}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When}{\f1\fs36\cf2\lang3082  a }{\f1\fs36\cf2\lang3082 user}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 interaction}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 statement}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 takes}{\f1\fs36\cf2\lang3082  control of }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 application}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 copy}{\f1\fs36\cf2\lang3082  of }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 tree}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 on}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  Genero }{\f1\fs36\cf2\lang3082 Client}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 is}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 automatically}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 synchronized}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 with}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 Runtime}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 system}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 tree}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 by}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 Front }{\i\f1\fs36\cf2\lang3082 End}{\i\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 Protocol}{\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 an}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 internal}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 protocol}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 used}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 by}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 Runtime}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 System}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The}{\f1\fs36\cf2\lang3082  Front }{\f1\fs36\cf2\lang3082 End}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 Protocol}{\f1\fs36\cf2\lang3082  defines a simple set of }{\f1\fs36\cf2\lang3082 operations}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 to}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 edit}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 the}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 Abstract}{\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 User}{\f1\fs36\cf2\lang3082  Interface }{\f1\fs36\cf2\lang3082 tree}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling}{\b\f1\fs48\cf1  a Genero BDL }{\b\f1\fs48\cf1 Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 topic}{\b\f1\fs40\cf1\lang3082  }{\b\f1\fs40\cf1\lang3082 discusses}{\b\f1\fs40\cf1\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 Compiling}{\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 Database}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 Schema}{\b\ul\f1\fs32\cf2\lang3082  Files\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\ul\f1\fs32\cf2\lang3082 Form}{\b\ul\f1\fs32\cf2\lang3082  }{\b\ul\f1\fs32\cf2\lang3082 Specification}{\b\ul\f1\fs32\cf2\lang3082  Files\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Compiling \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Your Genero BDL program can consist of a single source code module, but generally you will have multiple modules, form specification files, and perhaps localized string files. Database schema files are also required if you have defined data types and variables in an existing database column or table using the DEFINE ... LIKE statement \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The tools that Genero uses to compile the various application files, the file extensions of the source code, and\'a0the corresponding compiled files, are listed below \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The Genero BDL source code }{\i\f1\fs36\cf2\lang3082 compiler}{\f1\fs36\cf2\lang3082  generates hardware-independent pseudo-machine code (P-code). \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This code is not directly executable by the operating system or GUI, but can be interpreted by the Genero BDL }{\i\f1\fs36\cf2\lang3082 runner }{\f1\fs36\cf2\lang3082 (usually named }{\b\f1\fs36\cf2\lang3082 fglrun}{\f1\fs36\cf2\lang3082 ). \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The compiled P-code modules are binary. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The files are not printable or editable as text. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The compiled source code modules can be linked into a program executed by the Runtime System, or into a library that can be linked into other programs}{\f1\fs32\cf2\lang3082 .\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Compiling and Building Applications from the command-line \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\f1\fs32\cf2\lang3082 Tool fglcomp: Module compiler}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 This tool compiles a program source module (extension .4gl) into a pseudo-code version. The compiled module has an extension of }{\b\f1\fs28\cf2\lang3082 .42m}{\f1\fs28\cf2\lang3082 .\'a0 If the compilation fails, a text file flagging the errors is created.\'a0 The error file has an extension of }{\b\f1\fs28\cf2\lang3082 .err}{\f1\fs28\cf2\lang3082 .\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 If your program consists of more than one module, the modules must be linked together prior to execution.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\f1\fs32\cf2\lang3082 Tool fgllink: Module linker}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 This tool assembles multiple p-code modules compiled with fglcomp into a single }{\b\f1\fs28\cf2\lang3082 .42r}{\f1\fs28\cf2\lang3082  program or a }{\b\f1\fs28\cf2\lang3082 .42x}{\f1\fs28\cf2\lang3082  library. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\f1\fs32\cf2\lang3082 Tool fgl2p: Program compiler}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 This tool is provided to create programs or libraries in one command line. It uses the }{\b\f1\fs28\cf2\lang3082 fglcomp}{\f1\fs28\cf2\lang3082  and the }{\b\f1\fs28\cf2\lang3082 fgllink}{\f1\fs28\cf2\lang3082  tools to compile and link modules together. If compilation of any of the modules fails, the file <}{\i\f1\fs28\cf2\lang3082 modulename}{\f1\fs28\cf2\lang3082 >.err is created. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Note: Windows or Unix-based }{\b\i\f1\fs36\cf1\lang3082 makefiles}{\b\f1\fs36\cf1\lang3082  may be used as well, to automate the process of compiling and linking programs \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Compiling a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Database Schema Files\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Database Schema Files are used during program compilation to define data types, default values, display attributes and validation rules for form fields and program variables \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Database schema files are generated from the database system tables.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The generated file\'a0 is }{\b\f1\fs36\cf2\lang3082 <database>.sch}{\f1\fs36\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The SCHEMA statement in program source files and form files identifies the database schema file to be used \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The FGLDBPATH environment variable can be used to define a list of directories where the compiler can find database schema files. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 You must generate database schema files each time the database structure changes, before compiling any other parts of your application \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Generating a schema from the command line \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The Schema Extractor (}{\b\f1\fs36\cf2\lang3082 fgldbsch)}{\f1\fs36\cf2\lang3082  is the tool provided to generate the database schema files from a database \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Deploying a Genero BDL Application}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Deployment \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The following program files must be deployed at the user site: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 .42r}{\f1\fs32\cf2\lang3082 , }{\b\f1\fs32\cf2\lang3082 .42x, .42m}{\f1\fs32\cf2\lang3082 : Executable programs and libraries, and p-code modules \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 .42f: }{\f1\fs32\cf2\lang3082 Runtime Form Files \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 .42s: }{\f1\fs32\cf2\lang3082 Compiled Localized String Files, if used in your applications \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 .4ad}{\f1\fs32\cf2\lang3082 , }{\b\f1\fs32\cf2\lang3082 .4st, .4sm: }{\f1\fs32\cf2\lang3082 These default XML files, provided with Genero, must be distributed with the runtime system files;\'a0if you have customized these files, or created your own versions, your versions must be deployed instead \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1 Resources for the programmer}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Documentation \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\f1\fs32\cf2\lang3082 Business Development Language Manual (User Guide)}{\f1\fs32\cf2\lang3082 : \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The following pages from the User Guide\'a0 may be especially helpful in understanding the Genero BDL language: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Dynamic User Interface \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Windows and Forms \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Programs \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Connections \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Transactions \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 SQL Programming \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Built-In Classes \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The following pages from the User Guide may be especially helpful if you are migrating an application from an earlier product \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 New Features \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Tools and Components \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 ODI Adaptation Guides \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 version-specific Migration Issues\'a0 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 FAQs \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1 Code examples\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Short example programs in the }{\b\f1\fs32\cf2\lang3082 demo}{\f1\fs32\cf2\lang3082  subdirectory of the BDL software installation directory illustrate the use of Genero BDL features; these programs may be compiled and executed \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Setting up The Course Environment}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 1.1}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Your instructor will show you the custdemo database on the training server :\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2 Please have a look at LABS folder, there you can see:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Custdemo.sql.- database tables\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Loadcust.sql.- data for loading\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Loadmanycust.4gl .- alternative genero program for loading data\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2 If you prefer, create and load the custdemo database on you own server \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2 Create a schema file for the custdemo database\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Fgldbsch or fglschema }{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 Create a shortcut on your desktop to the Genero BDL Documentation}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 2: Using Genero BDL}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Using Genero BDL}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This chapter provides a summary of creating a\'a0 simple BDL program \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Two example programs illustrate program flow control, the definition of variables, basic BDL statements,\'a0 and interaction with a database.\'a0 }{\b\f1\fs40\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Guidelines for writing BDL programs}{\b\f1\fs40\cf1\lang1033 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Genero BDL source code is written as text in a source module (a file with a filename extension of }{\b\f1\fs36\cf2\lang3082 .4gl }{\f1\fs36\cf2\lang3082 ). \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 BDL statements do not require a statement terminator. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can begin a }{\b\f1\fs36\cf2\lang3082 comment}{\f1\fs36\cf2\lang3082  that terminates at the end of the current line with a pair of minus signs ( -- ).\'a0 Curly braces \'7b \'7d can be used to delimit comments that occupy multiple lines. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 All white space in a source code module is treated as a single space, so you are free to use indentations and white space for clarity. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Although the language keywords in this example and throughout the tutorial are in all-capitals,\'a0 this is just a convention used in these documents. You may write keywords in lowercase, or any combination of capitals and lowercase you prefer. }{\f1\fs36\cf2\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 BDL Program Structure \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 A Simple BDL Program\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Compiling and Executing Genero BDL Programs}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 BDL Program Structure:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Because Genero BDL is a structured programming language as well as a 4th generation language, executable statements can appear only within logical sections of the source code called program blocks. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This can be the MAIN statement, a FUNCTION statement, or a REPORT statement. Reports are discussed in }{\ul\f1\fs36\cf2\lang3082 Chapter 9}{\f1\fs36\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Execution of any program begins with the special, required program block MAIN}{\b\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 delimited by the keywords MAIN and END MAIN \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The source module that contains MAIN is called the main module \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The FUNCTION statement is a unit of executable code, delimited by FUNCTION and END FUNCTION,\'a0 that can be called by name.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A small program, you can write all the functions used in the program in a single file. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Functions are available on a global basis. In other words, you can reference any function in any source module of your program. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 2.1}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A simple BDL Program:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This simple example illustrates a small but complete Genero BDL program, }{\b\f1\fs32\cf2\lang3082 simple.4gl}{\f1\fs32\cf2\lang3082 , that}{\b\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 displays a text message to the screen\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson2\'94. There you will find the simple BDL program\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93simple.rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 2.2 (optional)}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Compiling and Executing the simple program:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2 FROM GENERO STUDIO PROJECT VIEWER}{\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Select the program in the Browser Panel\'a0 and right-click to display the contextual menu. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Choose}{\b\f1\fs32\cf2\lang3082  Build}{\f1\fs32\cf2\lang3082  or }{\b\f1\fs32\cf2\lang3082 Execute Application}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The output from compiling\'a0 is displayed in the Output panel at the bottom of the Project Viewer window \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If there are any compilation errors, an Error list tab opens to let you navigate through the errors. Double-clicking a compile error opens the Code Editor at the current line \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 A simple BDL Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 2.3}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Compiling from the command line:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 To create the pseudo-code module simple.42m; if there are compile errors, the file simple.err is created \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\i\f1\fs32\cf2\lang3082 fglcomp simple.4gl}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 To execute the single-module program.\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\plain\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\b\i\f1\fs32\cf2\lang3082 fglrun simple.42m}{\f1\fs28\cf2\lang3082   \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The \'93Connect to Database\'94 Program  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Database Interaction\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 Variable Definition}{\b\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Variable Scope\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Passing Variables\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Retrieving Data from a Database\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Code Example}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The "Connect to Database" Program \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This program illustrates connecting to a database and retrieving data, defining variables, and passing variables between functions. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A row from the customer table of the custdemo example database is retrieved by an SQL statement and displayed to the user.}{\b\f1\fs36\cf2\lang3082 \'a0}{\f1\fs36\cf2\lang3082  }{\b\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Database Interaction  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A Database Connection is a work session, opened by the program to communicate with a specific database server, in order to execute SQL statements as a specific user. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 To connect to a database server, most database engines require a name to identify the server, a name to identify the database entity, a user name and a password.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Connecting through the Open Database Interface, the database can be specified directly, and the specification will be used as the data source. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082  You can also define the database connection parameters indirectly in the FGLPROFILE configuration file, and the database specification will be used as a key to read the connection information from the file.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The CONNECT instruction opens a session in multi-session mode \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 If you have multiple connections open, use the SET CONNECTION instruction to switch to a specific session \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Use the DISCONNECT instruction to disconnect from specific sessions, or from all sessions. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\i\f1\fs36\cf2\lang3082 CONNECT TO "custdemo"}{\i\f1\fs36\cf2\lang3082  }{\b\i\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\i\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Variable Definition   \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A Variable contains volatile information of a specific BDL}{\b\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 data type. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Variables must be declared before you use them in your program, using the }{\f1\fs36\cf4\lang3082 DEFINE }{\f1\fs36\cf2\lang3082 statement}{\f1\fs36\cf4\lang3082 .\'a0}{\f1\fs36\cf2\lang3082   \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\i\f1\fs36\cf2\lang3082 DEFINE cont_ok INTEGER}{\f1\fs36\cf2\lang3082  }{\i\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\i\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the LIKE keyword to declare a variable that has the same data type as a specified column in a database schema. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The column data type defined by the database schema must be supported by the language. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\i\f1\fs36\cf2\lang3082 DEFINE store_name LIKE customer.store_name}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\i\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Variable Scope   \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Variables defined in a FUNCTION, REPORT or MAIN program block have }{\i\f1\fs32\cf2\lang3082 local scope}{\f1\fs32\cf2\lang3082  (are known only within the program block).\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 DEFINE statement declares the variables and causes memory to be allocated for them.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 DEFINE must precede any executable statements within the same program block. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A Variable defined with }{\i\f1\fs32\cf2\lang3082 modular scope}{\f1\fs32\cf2\lang3082  can have its value set and can be used in any function within a single source-code module.\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The DEFINE statement must appear at the top of the module, before any program blocks.   \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Memory for module variables is allocated statically, when the program starts, and is released when the program ends. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A Variable with }{\i\f1\fs32\cf2\lang3082 local}{\f1\fs32\cf2\lang3082  scope can have its value set and can be used only within the function in which it is defined. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The DEFINE statement must be the first statement in the function.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Memory for the variable is allocated when the function is called by a program, and is released when the function ends. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A variable defined with }{\i\f1\fs32\cf2\lang3082 global}{\f1\fs32\cf2\lang3082  scope can have its value set and can be used in any function within the entire program. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The DEFINE statement must appear within a GLOBALS program block. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The memory for global variables is allocated statically when the program starts, and released when the program ends. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A compile-time error occurs if you declare the same name for two variables that have the same scope. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 However, you can declare the same name for variables that differ in their scope. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Passing Variables   \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Functions are invoked using the CALL statement. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Variables can be passed as arguments to a function when it is invoked. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The parameters can be variables, literals, constants, or any valid expressions. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Arguments are separated by a comma. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the function returns any values, the RETURNING clause of the CALL statement assigns the returned values to variables in the calling routine.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The number of input and output parameters is static. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The function that is invoked must have a RETURN instruction to transfer the control back to the calling function and pass the return values. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The number of returned values must correspond}{\b\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2\lang3082 to the number of variables listed in the RETURNING clause of the CALL statement invoking this function. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\i\f1\fs32\cf2\lang3082 CALL myfunc() \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\i\f1\fs32\cf2\lang3082 CALL newfunc(var1) RETURNING var2 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Retrieving Data from a Database    \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Using Static SQL, an embedded SQL SELECT statement can be used to retrieve data from a database table into program variables. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If the SELECT statement returns only one row of data, you can write it directly as a procedural instruction, using the INTO clause to provide the list of variables where the column values will be fetched. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If the SELECT statement returns more than one row of data, you must declare a database cursor to process the result set. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Connect to Database Program}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 2.4}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Connect to Database Program\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson2\'94. There you will find the simple BDL program called \'93connectdb.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93connectdb.rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 3: Record Display}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Record Display}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 The example program in this chapter opens a WINDOW containing a FORM that displays information to the user. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 The options to retrieve data or exit are defined in a MENU statement, and displayed as buttons on the form.\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 When the user presses the "query" button, an SQL SELECT statement retrieves a single row from the customer table and displays it on the form.\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 A FORM contains form fields for entering and displaying data; explanatory text; and buttons, drop-down menus, folders, tables, checkboxes, images, and other form objects (referred to as }{\b\i\f1\fs32\cf1\lang3082 views}{\b\f1\fs32\cf1\lang3082 ) \'a0  }{\b\f1\fs32\cf1\lang1033 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs32\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Opening Windows and Forms \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Displaying Messages to the User\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Using Menus}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Opening Windows and Forms\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the OPEN WINDOW ... WITH FORM instruction to automatically open a window containing a specified form: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf5\lang3082 OPEN WINDOW custwin WITH FORM "custform" \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When using a graphical front end, windows are created as independent, resizable windows. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 By default, windows display as normal application windows, but you can specify a Presentation Style \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The default Presentation Style file (FGLDIR/lib/default.4st) defines the standard window styles. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If the WITH FORM option is used to open a window, the CLOSE WINDOW statement closes both the window and the form: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf5\lang3082 CLOSE WINDOW custwin }{\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\ul\f1\fs36\cf2\lang3082 When the runtime system starts a program, it creates a default window named SCREEN}{\f1\fs36\cf2\lang3082 . This default window can be used as another window, but it can also be closed if not needed: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf5\lang3082 CLOSE WINDOW SCREEN}{\b\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs36\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Displaying Messages to the User\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the MESSAGE and ERROR statements to display text messages to the user.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Text is displayed in a specific area, depending on the front end configuration and window style. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The MESSAGE text is displayed until it is replaced by another MESSAGE statement or field comment.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can specify any combination of variables and strings for the text.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 BDL generates the message by replacing any variables with their values and concatenating the strings.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Using the double pipe ( || ) as the concatenation symbol:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\plain\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\b\f1\fs28\cf5\lang3082 MESSAGE "Customer " || l_custrec.store_num || " retrieved." \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Using the comma ( , ) as the concatenation symbol: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\plain\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\b\f1\fs28\cf5\lang3082 MESSAGE "Customer " , l_custrec.store_num , " retrieved."}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs36\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Using Menus\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Forms can display options such as buttons, drop-down menus (Topmenus), Toolbars, and other objects (}{\i\f1\fs36\cf2\lang3082 action views)}{\f1\fs36\cf2\lang3082  in the window. An action\'97an executable program routine\'97can be associated with each action view. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In your BDL program, you can use the interactive MENU statement to supply the list of actions and the statement, or block of statements, to execute. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Using an ON ACTION clause to define the action name and the statements to execute for the action: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 ON ACTION query \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 \tab \tab CALL query_cust()\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 The ON ACTION clause can also be used with other interactive statements such as INPUT, INPUT ARRAY, etc.\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Using a COMMAND clause to define the text to be displayed, an optional help comment, and the action (statements to be executed):\'a0 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 COMMAND may not be used with other interactive statements, and no additional decoration can be defined for the action.\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The COMMAND clause can be used in non-graphical applications to define key sequences for an action.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can nest MENU statements within MENU control blocks, so that the menus form a "tree" hierarchy. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When the MENU statement in your program is executed, the action views for the actions listed in the MENU statement are enabled. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Only the action views in the specific MENU statement are enabled, so you must include a method for exiting the MENU statement. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Interacting with the User}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 3.1}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Connecting to a Database\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson3\'94. There you will find the simple BDL program called \'93dispcust.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 dispcust}{\f1\fs28\cf2 .rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Defining a record \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Displaying a record}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Defining a Record\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In addition to defining individual variables, the DEFINE statement can define a record, a collection of variables each having its own data type and name. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 DEFINE custrec RECORD \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 store_num CHAR(5) \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 store_name CHAR(20) \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 \tab     END RECORD}{\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A record can also contain variables for the columns of a database table: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 DEFINE custrec RECORD\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 store_num\'a0 LIKE customer.store_num \'a0\'a0\'a0\'a0 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 store_name LIKE customer.store_name \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 END RECORD}{\f1\fs28\cf2\lang3082  }{\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This string defines a record that includes members that match the data type in all columns for a database table. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 it's best to list each member individually, so that a change in the structure of the database table won't break your code. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The record can also contain members that are not defined in the terms of a database table. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Displaying a Record\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Access any member of a record by writing the name of the record, a dot, and the name of the member; use the asterisk to denote all members of a record: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 DISPLAY custrec.store_num}{\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Displaying a Record in a Form \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the names of database columns as the names of both the members of a program record and the fields in a form.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the DISPLAY BY NAME statement to display program variables in the form.  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 DISPLAY BY NAME custrec.*\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The program variables serve as the intermediary between the database and the form displayed to the user. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 An SQL SELECT statement retrieves the values for the program variables from a row in the database, and displays them in the form.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 3.2}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Retrieving a Row\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson3\'94. There you will find the simple BDL program called \'93dispcust.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 dispcust_fquery_cust}{\f1\fs28\cf2 .rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Form Especification File}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Use the form specification file to specify a form's layout. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This file is compiled separately from your program \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 form specification file defines the initial settings for the form, which can be changed at runtime.\'a0\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Form specification files can be defined using a text editor (the file should have the extension }{\b\f1\fs36\cf2\lang3082 .per}{\f1\fs36\cf2\lang3082 ). \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The structure of the form is independent of the form's use. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The SCHEMA Section (optional) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The ACTION DEFAULTS Section\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 Layout Section\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 Tables Section\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 Attributes Section\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 Instruction Section}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Form Especification File}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The SCHEMA Section (optional) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This specifies the database schema file to be used when the form is compiled. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 It is required if any form items are defined as data types based on a column of a database table. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The ACTION DEFAULTS, TOPMENU, and TOOLBAR Sections (optional) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use these sections to define the decoration for action views (action defaults), as well as to define Topmenus and Toolbars for the form. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 External XML files can also be created to contain your definitions; in that case, they can be applied to any form. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Form Especification File}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The LAYOUT Section\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This section defines the appearance of a form using a layout tree of containers, which can hold other containers or define a screen area. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Some of the available containers include GRID, VBOX, HBOX, GROUP, FOLDER, and PAGE. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Within a GRID container, for example,\'a0 you can specify the position of LABELS, form fields, additional form items or interactive objects such as BUTTON, COMBOBOX,\'a0CHECKBOX,\'a0RADIOGROUP, PROGRESSBAR}{\b\f1\fs36\cf2\lang3082 , }{\f1\fs36\cf2\lang3082 etc.\'a0\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Form fields are form items the program uses to display data and take input.\'a0  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The TABLES Section (optional) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If any of the form fields reference a database column,\'a0 the table must be listed in the TABLES section \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A default screen record is automatically created for the form fields associated with each table listed in this section.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Form Especification File}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The ATTRIBUTES Section \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The ATTRIBUTES section defines properties of the form fields, buttons, and other items used in the form. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs32\cf2 You can}{\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Define acceptable input values, on-screen comments, and default values for fields \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Ensure that a value is entered in the field during the input of a new row (REQUIRED) \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Specify columns in a table as sortable or non-sortable \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Format numbers and dates for display \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Define data entry patterns \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Upshift or downshift input data \'a0  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The INSTRUCTIONS Section (optional) \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Use the INSTRUCTIONS section to define explicit screen records or screen arrays. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 3.3}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Defininig the Form Especification\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson3\'94. There you will find the simple BDL program called \'93dispcust.per\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 dispcust_form}{\f1\fs28\cf2 .rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Form Especification File}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Compiling the FORM/PROGRAM \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can compile the form specification separately; your program will automatically use the latest compilation of the form.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When you compile a form specification file, an XML file with a }{\b\f1\fs36\cf2\lang3082 .42f}{\f1\fs36\cf2\lang3082  file extension is generated. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The runtime system uses this file along with your programs to define the Abstract User Interface.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Working with Records and Forms}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 3.4}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs40 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'96}}{\f1\fs40\cf2\lang3082 Compiling the Form/Program \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\f1\fs36\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Compile the form\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs28\cf5\lang3082 fglform dispcust.per \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Compile the single module program: \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs28\cf5\lang3082 fglcomp dispcust.4gl \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Execute the program: \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs28\cf5\lang3082 fglrun dispcust.42m \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs32\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 4: Searching a Database}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Searching a Database}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 This program\'a0 implements query-by-example, using the CONSTRUCT statement to allow the user to enter criteria in a form.\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The criteria is used to build an SQL SELECT statement that will retrieve rows from the customer database table. }{\b\f1\fs32\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 A SCROLL CURSOR is defined in the program, to allow the user to scroll back and forth between the rows of the result set.\'a0 }{\b\f1\fs32\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The SQLCA.SQLCODE is used to test the success of the SQL statements. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Handling errors, and allowing the user to cancel the query, is also discussed\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Query-by-Example}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Implementing Query-by-Example}{\f1\fs36\cf2\lang3082  }{\b\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Using CONSTRUCT and STRING Variables\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Preparing the SQL Statement}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Query-by-Example}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\f1\fs28\cf1\lang3082 Implementing Query-by-Example\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2\lang3082 Query-by-Example allows users to enter a value or a range of values for one or several form fields. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs24 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'95}}{\f1\fs24\cf2\lang3082 The program looks up the database rows that match the criteria entered in the form fields. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs24 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'95}}{\f1\fs24\cf2\lang3082 The BDL statement that makes this possible is CONSTRUCT. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs24 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'96}}{\f1\fs24\cf2 Steps:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 Define fields linked to database columns in a form specification file.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 Define a STRING variable in your program to hold the query criteria. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 Display the form.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 Activate the form with the interactive dialog statement CONSTRUCT, for entry of the query criteria. Control is turned over to the user to enter his criteria. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 The user enters his criteria in the fields specified in the CONSTRUCT statement.\'a0 The CONSTRUCT statement accepts logical operators in any of the fields to indicate ranges, comparisons, sets, and partial matches.\'a0 Using the form in this program, for example, the user can enter a specific value, such as }{\b\f1\fs26\cf2\lang3082 IL}{\f1\fs26\cf2\lang3082  in the }{\b\f1\fs26\cf2\lang3082 state}{\f1\fs26\cf2\lang3082  field, to retrieve all the rows from the }{\b\f1\fs26\cf2\lang3082 customer}{\f1\fs26\cf2\lang3082  table where the }{\b\f1\fs26\cf2\lang3082 state}{\f1\fs26\cf2\lang3082  column = }{\b\f1\fs26\cf2\lang3082 IL}{\f1\fs26\cf2\lang3082 .\'a0Or he can enter relational tests (such as}{\b\f1\fs26\cf2\lang3082  > 103}{\f1\fs26\cf2\lang3082 , in the }{\b\f1\fs26\cf2\lang3082 Store #}{\f1\fs26\cf2\lang3082  field) to retrieve only those rows where the }{\b\f1\fs26\cf2\lang3082 store_num}{\f1\fs26\cf2\lang3082  column is greater than }{\b\f1\fs26\cf2\lang3082 103}{\f1\fs26\cf2\lang3082 .\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 After entering his criteria, the user selects }{\b\f1\fs26\cf2\lang3082 OK}{\f1\fs26\cf2\lang3082 , to instruct your program to continue with the query, or }{\b\f1\fs26\cf2\lang3082 Cancel}{\f1\fs26\cf2\lang3082  to close the dialog.\line In this program, the action views for accept (OK) and cancel are displayed as buttons on the screen.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 If the user selects OK, the CONSTRUCT statement creates a Boolean expression by generating a logical expression for each field with a value and then applying unions (and relations) to the field statements.\'a0 This expression is stored in the\'a0 string variable that you specified in the CONSTRUCT statement.\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 You can then use the Boolean expression to create a new STRING variable containing the complete SELECT statement.\'a0 You must supply the WHERE keyword to convert the Boolean expression into a WHERE clause. Make sure that you supply the spaces required to separate the constructed Boolean expression from the other parts of the SELECT statement. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs26 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs26{\pntxtb \'95}}{\f1\fs26\cf2\lang3082 Execute the statement to retrieve the row(s) from the database table, after preparing it, or declaring a cursor for SELECT statements that might retrieve more than one row. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Query-by-Example}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Using CONSTRUCT and STRING Variables \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A basic CONSTRUCT statement has the following format: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs28\cf5\lang3082 CONSTRUCT <variable-name> ON <column-list> FROM <field-list> }{\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 This statement temporarily binds the specified form fields to database columns. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 It allows you to identify database columns for which the user can enter search criteria.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Each field and CONSTRUCT corresponding column must be the same or compatible data types. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Use the BY NAME clause when the fields on the screen form have the same names as the corresponding columns in the ON clause. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The user can query only the screen fields listed in the BY NAME clause. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 CONSTRUCT BY NAME <variable-name> ON <column-list>}{\f1\fs24\cf5\lang3082  }{\b\f1\fs24\cf5\lang3082  }{\b\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The runtime system converts the entered criteria into a Boolean SQL condition that can appear in the WHERE clause of a SELECT statement. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 variable to hold the query condition can be defined as a}{\b\f1\fs28\cf2\lang3082  }{\f1\fs28\cf2\lang3082 STRING\'a0 data type. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Strings are a variable length, dynamically allocated character string data type, without a size limitation. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The STRING variable can be concatenated, using the double pipe operator (||), with the text required to form a complete SQL SELECT statement.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Use the LET statement to assign a value to the variable. For example: \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Query-by-Example}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 DEFINE where_clause, sqltext STRING \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 CONSTRUCT BY NAME where_clause ON customer.* \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 LET sql_text = "SELECT COUNT(*) FROM customer WHERE " || where_clause}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\f1\fs28\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In this example, the user entered the criteria }{\b\f1\fs36\cf2\lang3082 > 101}{\f1\fs36\cf2\lang3082  in the }{\b\f1\fs36\cf2\lang3082 store_num}{\f1\fs36\cf2\lang3082  field. The }{\b\f1\fs36\cf2\lang3082 where_clause}{\f1\fs36\cf2\lang3082  would be generated as: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 "store_num > 101" }{\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 and the complete }{\b\f1\fs36\cf2\lang3082 sql_text}{\f1\fs36\cf2\lang3082  would be:\'a0\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 "SELECT COUNT(*) FROM customer WHERE store_num > 101" \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Query-by-Example}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Preparing the SQL Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The STRING created in the example is not valid for execution. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The PREPARE instruction sends the text of the string to the database server for parsing, validation, and to generate the execution plan.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The scope of a prepared SQL statement is the module in which it is declared. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 PREPARE cust_cnt_stmt FROM sql_text }{\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A prepared SQL statement can be executed with the EXECUTE instruction. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Since the SQL statement will only return one row (containing the count) the }{\b\f1\fs36\cf2\lang3082 INTO}{\f1\fs36\cf2\lang3082  syntax of the EXECUTE instruction can be used to store the count in the local variable }{\b\f1\fs36\cf2\lang3082 cust_cnt}{\f1\fs36\cf2\lang3082 : \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 EXECUTE cust_cnt_stmt INTO cust_cnt }{\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When a prepared statement is no longer needed, the FREE instruction releases the memory associated with the statement. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 FREE cust_cnt_stmt \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 DEFER INTERRUPT and the INT_FLAG\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Predefined Actions \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Conditional Logic \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 The IF Statement}{\b\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The CASE Statement \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 DEFER INTERRUPT and the INT_FLAG:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The statement DEFER INTERRUPT in your MAIN program block will prevent your program from terminating abruptly if a SIGINT signal is received. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When using a GUI interface,\'a0 the user can generate an interrupt signal if you have an action view named 'interrupt' (the predefined }{\b\f1\fs36\cf2\lang3082 interrupt}{\f1\fs36\cf2\lang3082  action). \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If an interrupt event is received, TRUE is assigned to the built-in global integer variable INT_FLAG. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Once deferred, the Interrupt signal causes no effect on most program statements; however it does terminate interactive dialog statements, such as CONSTRUCT.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This allows the user to cancel the CONSTRUCT statement and other interactive statements. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 It is common to test INT_FLAG after any interactive instruction to check if the user has cancelled the instruction. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Once INT_FLAG is set to TRUE, your program must re-set it to FALSE to detect a new interruption event.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Predefined Actions\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The language pre-defines some actions and associated names for common operations, such as }{\b\f1\fs36\cf2\lang3082 accept}{\f1\fs36\cf2\lang3082  or }{\b\f1\fs36\cf2\lang3082 cancel}{\f1\fs36\cf2\lang3082 , used during interactive dialogs with the user such as CONSTRUCT. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 You do not have to define these actions in the MENU statement or elsewhere \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can define action views (such as buttons, toolbar icons, menu items) in your form using these pre-defined names \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 the corresponding action will automatically be attached to the view. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When the CONSTRUCT statement executes, buttons representing }{\b\f1\fs36\cf2\lang3082 accept}{\f1\fs36\cf2\lang3082  and }{\b\f1\fs36\cf2\lang3082 cancel }{\f1\fs36\cf2\lang3082 actions will be displayed by default \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Allow the user to validate or cancel the interactive dialog statement. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the user selects Cancel, the INT_FLAG is automatically set to FALSE. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Conditional Logic \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Once the CONSTRUCT statement is completed, you must test whether the INT_FLAG was set to TRUE (whether the user cancelled the dialog.)\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Genero BDL provides the conditional logic statements IF or CASE\'a0 to test a set of conditions. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1 The IF Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 IF statements can be nested.\'a0 The ELSE clause may be omitted.\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 IF <}{\b\i\f1\fs24\cf5\lang3082 condition}{\b\f1\fs24\cf5\lang3082 >\'a0THEN \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 .... ELSE \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 .... END IF\'a0\'a0 }{\b\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 If\'a0 }{\i\f1\fs32\cf2\lang3082 condition }{\f1\fs32\cf2\lang3082 is TRUE, the runtime system executes the block of statements following THEN, until it reaches either the ELSE keyword or the END IF keywords. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 If }{\i\f1\fs32\cf2\lang3082 condition }{\f1\fs32\cf2\lang3082 is FALSE, the runtime system executes the block of statements between ELSE and END IF. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 IF (INT_FLAG = TRUE) THEN \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs20\cf5\lang3082 LET INT_FLAG = FALSE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs20\cf5\lang3082 LET cont_ok = FALSE \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 ELSE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs20\cf5\lang3082 LET cont_ok = TRUE \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs24\cf5\lang3082 END IF \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The CASE Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 The }{\f1\fs36\cf2\lang3082 CASE statement specifies statement blocks to be executed conditionally, depending on the value of an expression. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Unlike IF statements, CASE does not restrict the logical flow of control to only two branches. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If you have a series of\'a0 nested IF statements, the CASE statement may be more readable. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 CASE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082   WHEN (INT_FLAG = TRUE) \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082      LET INT_FLAG = FALSE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082      LET cont_ok = FALSE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082   OTHERWISE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082     LET cont_ok = TRUE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 END CASE}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Usually, there would be several conditions to check.\'a0 The following statement uses an alternative syntax, since all the conditions check the value of }{\b\f1\fs32\cf2\lang3082 var1}{\f1\fs32\cf2\lang3082 : \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 CASE var1 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082    WHEN 100 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082          CALL routine_100() \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082    WHEN 200 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082          CALL routine_200() \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082    OTHERWISE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082         CALL error_routine() \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 END CASE }{\b\f1\fs24\cf5 \tab \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The first WHEN condition in the CASE statement will be evaluated. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the condition is true(var1=100), the statement block is executed and the CASE statement is exited. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the condition is not true, the next WHEN condition will be evaluated, and so on through subsequent WHEN statements until a condition is found to be true, or OTHERWISE or END CASE is encountered.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The OTHERWISE clause of the CASE statement can be used as a catch-all for unanticipated cases. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.1}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Generating a Main Query Program\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custmain.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custmain}{\f1\fs28\cf2 .rtf\'94 file to know the program meaning}{\b\f1\fs32\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.2}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Logic for querying the database\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery}{\f1\fs28\cf2 .rtf\'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Canceling the Search}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.3}{\b\f1\fs40\cf1\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Returning the number of rows matching the query criteria\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_getcustcnt.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Using Cursors}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The SQLCA.SQLCODE}{\f1\fs36\cf2\lang3082  }{\b\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Using Cursors\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When an SQL SELECT statement in your application will retrieve more than one row, a cursor must be used to pass the selected data to the program one row at a time. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The cursor is a data structure that represents a specific location within the active set of rows that the SELECT statement retrieved. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 Sequential cursor: }{\f1\fs32\cf2\lang3082 reads through the active set only once each time it is opened, by moving the cursor forward one row each time a row is requested. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 Scroll cursor: }{\f1\fs32\cf2\lang3082 fetches the rows of the active set in any sequence.\'a0To implement a scroll cursor, the database server creates a temporary table to hold the active set.\'a0\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The scope of a cursor is the module in which it is declared. Cursor names must be }{\ul\f1\fs36\cf2\lang3082 unique}{\f1\fs36\cf2\lang3082  within a module \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Using Cursors\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The general sequence of\'a0 program statements when using a SELECT cursor for Query-by-Example is:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 DECLARE}{\f1\fs32\cf2\lang3082 : the program declares a cursor for the STRING that contains the SQL SELECT statement.\'a0This allocates storage to hold the cursor. Note that the string does not have to be prepared using the PREPARE statement. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 OPEN}{\f1\fs32\cf2\lang3082 : the program opens the cursor.\'a0The active set associated with the cursor is identified, and the cursor is positioned before the first row of the set. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 FETCH}{\f1\fs32\cf2\lang3082 : the program fetches a row of data into host variables and processes it.\'a0 The syntax }{\i\f1\fs32\cf2\lang3082 FETCH NEXT <cursor-identifier> INTO <variable-names>}{\f1\fs32\cf2\lang3082  can be used with a SCROLL CURSOR to fetch\'a0the next row relative to the current position of the cursor in the SQL result set.\'a0 Using FETCH PREVIOUS ... moves the cursor back one row in the SQL result set. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 CLOSE}{\f1\fs32\cf2\lang3082 : the program closes the cursor after the last row desired is fetched.\'a0 This releases the active result set associated with the cursor.\'a0 The cursor can be re-opened. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf2\lang3082 FREE}{\f1\fs32\cf2\lang3082 : when the cursor is no longer needed, the program frees the cursor to release the storage area holding the cursor.\'a0Once a cursor has been freed, it must be declared again before it can be re-opened.\'a0\'a0 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The SQLCA.SQLCODE\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The "SQLCA" name stands for "SQL Communication Area."\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 SQLCA variable is a predefined record containing information on the execution of an SQL statement.\'a0\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The\'a0 SQLCA record is filled after any SQL statement execution. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The SQLCODE member of this record contains the SQL execution code: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The NOTFOUND constant is a predefined integer value that evaluates to 100. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This constant is typically used to test the execution status of an SQL statement returning a result set, to check if rows have been found. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.4\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Declaring and opening a cursor to retrieve the database rows from the result set\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_cust_select.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.5\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Fetching from the customer database table\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_fetch_cust.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.6\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Direction for moving the cursor, options: next, previous\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_fetch_rel_cust.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.7\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Displaying the contents of a customer database  row in the form\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_display_cust.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Retrieving Database Data}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.8\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Compiling and Linking the Program\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The two example modules must be compiled and\'a0then linked into a single program.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 From the command line \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Compile the program modules:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 fglcomp custmain.4gl \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 fglcomp custquery.4gl \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This produces the object modules }{\b\f1\fs32\cf2\lang3082 custmain.42m}{\f1\fs32\cf2\lang3082  and }{\b\f1\fs32\cf2\lang3082 custquery.42m}{\f1\fs32\cf2\lang3082 , which must be linked to produce the program }{\b\f1\fs32\cf2\lang3082 cust.42r}{\f1\fs32\cf2\lang3082 :\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 fgllink -o cust.42r custmain.42m custquery.42m}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Or, compile both modules and link at the same time:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 fgl2p -o cust.42r custmain.4gl custquery.4gl}{\f1\fs28\cf5\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Execute the program: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 fglrun cust.42r}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The WHENEVER ERROR Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Negative SQLCA.SQLCODE\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 SQLERRMESSAGE}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Close and Free the Cursor\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Error if Cursor is not Open\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The WHENEVER ERROR Statement \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Since program statements that access the database may be expected to fail occasionally (the row is locked, etc.) the WHENEVER ERROR statement can be used to handle this type of error. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 By default, }{\ul\f1\fs36\cf2\lang3082 when a runtime error occurs the program will stop}{\f1\fs36\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 prevent this happening when SQL statements that access the database fail, surround the SQL statement with WHENEVER ERROR statements, as in the following example based on the }{\b\f1\fs36\cf2\lang3082 fetch_cust}{\f1\fs36\cf2\lang3082  function in the }{\b\f1\fs36\cf2\lang3082 custquery.4gl}{\f1\fs36\cf2\lang3082  program module: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 IF (p_fetch_flag = 1) THEN \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 WHENEVER ERROR CONTINUE \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 FETCH NEXT cust_curs INTO mr_custrec.* \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 WHENEVER ERROR STOP}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 WHENEVER ERROR statements are modular in scope and generate additional code for exception handling when the module is compiled \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 WHENEVER ERROR CONTINUE generates code to prevent the program from stopping if the FETCH statement fails. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 You can write your own error function to handle SQL errors, and use the }{\b\i\f1\fs32\cf5\lang3082 WHENEVER ERROR CALL <function-name>}{\f1\fs32\cf2\lang3082  syntax to activate it. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Run-time errors may be logged to an error log.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Negative SQLCA.SQLCODE\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The database server returns an execution code whenever an SQL statement\'a0 is executed, available in SQLCA.SQLCODE \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If the code is a negative number,\'a0 an SQL error has occurred.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The SQLCA.SQLCODE should be checked immediately after each SQL statement that may fail, including\'a0 DECLARE, OPEN, FETCH, etc.\'a0\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 SQLERRMESSAGE\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If an SQL error occurs, the SQLERRMESSAGE operator returns the error message associated with the error code.\'a0\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This is a character string that can be displayed to the user with the ERROR instruction. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 \tab ERROR SQLERRMESSAGE\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Close and Free the Cursor\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Closing and freeing the cursor when you no longer need it is good practice, especially if the modules are part of a larger program \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This function must be placed in the same module as the DECLARE/OPEN/FETCH statements and in sequence, so in the example this is the last function in the }{\b\f1\fs36\cf2\lang3082 query_cust}{\f1\fs36\cf2\lang3082  module.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Error if Cursor is not Open\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In the example program in this chapter, if the user selects the Next or Previous action from the MENU before he has queried, the program returns an error ("Program stopped at line .... Fetch attempted on unopened cursor.")\'a0 One way to prevent this error would be to add a variable to the program indicating whether the user has queried for a result set, and to prevent him from executing the actions associated with Next or Previous until he has done so. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.9\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Checking for errors when SQL statements are executed \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_fetch_cust_whenever.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.10\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Closing and Freeing cursors prior to the program end \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_cleanup.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.11\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Return the status of a query \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_cleanup.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 This lab is just for uncomment a line in the above mentioned file\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2 ...\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5 56 }{\b\f1\fs24\cf5\lang1033  --RETURN cont_ok  --LAB 4.11 Uncomment this line until you see this lab }{\b\f1\fs24\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.12\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Return the status of a query \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custquery.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_fetch_cust_status_qry.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 This lab is just for uncomment a line in the above mentioned file\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2 ...\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5 56 }{\b\f1\fs24\cf5\lang1033  --RETURN cont_ok  --LAB 4.11 Uncomment this line until you see this lab }{\b\f1\fs24\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Handling Errors}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 4.13\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Changing the menu statement in the custmain.4gl  module so a user cannot select Next or Previous if the query was not successful\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson4\'94. There you will find the simple BDL program called \'93custmain.4gl\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 custquery_fetch_cust_status_qry.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 This lab is just for uncomment the block and commnet the previous main block in the above mentioned file\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2 ...\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5 FROM LINE 28 TO LINE 65}{\b\f1\fs24\cf5\lang1033  \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang1033 \'85\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang1033 DON\'92T FORGET TO COMMENT THE PREVIOUS MAIN BLOCK\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Recompile the programs again\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs36\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 5: GUI Options}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 GUI Options}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 You can change the way that program options are displayed in a form in a variety of ways \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The example program in this chapter illustrates some of the simple changes that can be made: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 By changing the form specification file, you can provide the user with a valid list of abbreviations for the state field, and add a Toolbar or pulldown menu (Topmenu). The program business logic in the BDL program need not change.\'a0 After recompiling the form file, it can be used by the program with no additional changes required.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 You can change the appearance of the application window, adding a custom title and icon. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 You can disable and enable actions dynamically to control the options available to the user.\'a0 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The program also illustrates some of the Genero BDL action defaults that standardize the presentation of common actions \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Toolbar}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The TOOLBAR section of a form specification file defines a Toolbar with buttons that are bound to actions. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 A Toolbar definition can contain the following elements: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 an }{\b\f1\fs32\cf2\lang3082 ITEM:}{\f1\fs32\cf2\lang3082  specifies the action that is bound to the Toolbar button \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 a }{\b\f1\fs32\cf2\lang3082 SEPARATOR:}{\f1\fs32\cf2\lang3082 \'a0a vertical line\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Values can be assigned to TEXT, COMMENT, and IMAGE attributes for each item in the Toolbar \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The TOOLBAR commands are enabled by actions defined by the current interactive BDL instruction \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 which in our example is the MENU statement in the }{\b\f1\fs32\cf2\lang3082 custquery.4gl}{\f1\fs32\cf2\lang3082  module. When a Toolbar button is selected by the user, the program triggers the action to which the Toolbar button is bound. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The word }{\b\f1\fs32\cf2\lang3082 find}{\f1\fs32\cf2\lang3082  must be identical in both the TOOLBAR ITEM and the MENU statement action, and must always be in }{\ul\f1\fs32\cf2\lang3082 lower-case}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Toolbar}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.1\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Adding a Toolbar \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custform.per\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf2\lang3082 If the form specification was created in a text file \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2\lang3082 The portion of a form specification file,\'a0 }{\b\f1\fs24\cf2\lang3082 custform.per, }{\f1\fs24\cf2\lang3082 that}{\b\f1\fs24\cf2\lang3082  }{\ul\f1\fs24\cf2\lang3082 includes}{\f1\fs24\cf2\lang3082  a Toolbar section: \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 01 SCHEMA custdemo \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 02 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 03 TOOLBAR \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 04 ITEM find \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 05 ITEM previous \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 06 ITEM next \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 07 SEPARATOR \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 08 ITEM quit (TEXT="Quit", COMMENT="Exit the program", IMAGE="exit") \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 09 END \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 10 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 11 LAYOUT \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 12 GRID \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 13 \'7b \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 14         Store #:   [f01 ] Name:[f02                                    ] \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 15          Address:[f03                                                        ] \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 16                         [f04                                                         ]}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2\lang3082 .... \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Toolbar}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.1\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Adding a Toolbar \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custform.per\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf2\lang3082 Using Genero Studio Form Designer }{\f1\fs24\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Topmenu}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 Use the TOPMENU section of\'a0 the form specification to design the pull-down menu.\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 The TOPMENU section must appear after SCHEMA, and must contain a tree of GROUP elements that define the pull-down menu. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 The GROUP TEXT value is the title for the pull-down menu group.\'a0 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 GROUP can contain the following elements: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 a }{\b\f1\fs28\cf2\lang3082 COMMAND}{\f1\fs28\cf2\lang3082 : specifies the action the menu option must be bound to \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 a }{\b\f1\fs28\cf2\lang3082 SEPARATOR}{\f1\fs28\cf2\lang3082 : a horizontal line \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\b\f1\fs28\cf2\lang3082 GROUP children}{\f1\fs28\cf2\lang3082 : a subgroup within a group. \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 Values can be assigned to attributes such as TEXT, COMMENT, and IMAGE. for each item in the TOPMENU \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 As in a Toolbar, the TOPMENU commands are enabled by actions defined by the current interactive BDL instruction (dialog), which in our example is the MENU statement in the custquery.4gl module \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 When a TOPMENU option is selected by the user, the program triggers the action to which the TOPMENU command is bound.}{\b\f1\fs36\cf1\lang3082  \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Topmenu}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.2\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Adding a Topmenu \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custform.per\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf2\lang3082 If the form specification was created in a text file \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\f1\fs24\cf2\lang3082 The portion of a form specification file,\'a0 }{\b\f1\fs24\cf2\lang3082 custform.per, }{\f1\fs24\cf2\lang3082 that}{\b\f1\fs24\cf2\lang3082  }{\ul\f1\fs24\cf2\lang3082 includes}{\f1\fs24\cf2\lang3082  a Topmenu section: \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 01 SCHEMA custdemo \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 03 TOPMENU \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 04     GROUP form (TEXT="Form") \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 05         COMMAND quit (TEXT="Quit", COMMENT="Exit the program", IMAGE="exit") \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 06     END \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 07     GROUP stores (TEXT="Stores") \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 08         COMMAND find \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 09         SEPARATOR \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 13         COMMAND next \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 14         COMMAND previous \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 15     END \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 16 END}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a Topmenu}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.2\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Adding a Topmenu\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custform.per\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf2\lang3082 Using Genero Studio Form Designer }{\f1\fs24\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a COMBOBOX Form Item}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\b\f1\fs36\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Real values can be associated to display values, for example: ((1,"Paris"),(2,"Madrid"),(3,"London")).\'a0 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 See the BDL documentation for a complete list of the item types that can be used on a form \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Although the list of values for the COMBOBOX is contained in the form specification file in this example program \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 you could also set the INITIALIZER attribute to define a function that will provide the values \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 The initialization function would be invoked at runtime when the form is loaded (for example, to fill the COMBOBOX item list dynamically with database records). \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs28\cf5\lang3082 COMBOBOX f6=customer.state, ITEMS = ("IL", "IA", "WI");}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Setting a Window Title}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Specifying an Icon\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Changing the Window Style}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Setting a Window Title\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The default title for a window is the name of the object in the OPEN WINDOW statement \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 For example, in the programs we've seen so far, the title of the window is w1: \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 OPEN WINDOW w1 WITH FORM "custform\'93\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In the form specification file, the attribute TEXT of the LAYOUT section can be used to change the title of the parent window:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 LAYOUT(TEXT=Customer)}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Specifying an Icon\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The Genero runtime system provides built-in classes, or object templates, which contain methods, or functions, that you can call from your programs. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The classes are grouped together into packages. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 One package, }{\b\f1\fs32\cf2\lang3082 ui}{\f1\fs32\cf2\lang3082 , contains the "Interface" class, allowing you to manipulate the user interface. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 For example, the }{\b\f1\fs32\cf2\lang3082 setImage}{\f1\fs32\cf2\lang3082  method can be used to set the default icon for the windows of your program \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 You may simply call the method, prefixing it with the package name and class name; you do not need to create an Interface object. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang3082 CALL ui.Interface.setImage("}{\b\i\f1\fs28\cf5\lang3082 imagename}{\b\f1\fs28\cf5\lang3082 ") \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Changing the Window Style\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 By default windows are displayed as normal application windows \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can choose a specific style using the WINDOWSTYLE attribute of the LAYOUT section of the form file \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The default window styles are defined as a set of attributes in an external file (}{\b\f1\fs36\cf2\lang3082 default.4st)}{\f1\fs36\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs32\cf5\lang3082 LAYOUT(WINDOWSTYLE="dialog") \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.3\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Changing a Window\'92s Appearance\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custform.per\'94. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 In the LAYOUT section you can add\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 LAYOUT (TEXT="Customer") \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Customizing the Window}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.4\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Changing a Window\'92s Icon\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custmain.4gl\'94. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Add the following line\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 CALL ui.Interface.setImage( "exit") \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\plain\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\b\f1\fs28\cf5 Note that this line will be added BEFORE to open the form \'93custform\'94\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang1033 \'85\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang1033 CONNECT TO "custdemo"\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang1033 SET LOCK MODE TO WAIT 6\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang1033 CLOSE WINDOW SCREEN\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang3082 CALL ui.Interface.setImage( "exit") }{\b\f1\fs28\cf5\lang1033 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang1033 OPEN WINDOW w1 WITH FORM "custform"}{\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5 \'85}{\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Managing Actions}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Disable/Enable Actions}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2 The Close Action}{\b\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Managing Actions}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Disable/Enable Actions\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can disable and enable the actions instead, providing visual cues to the user when the actions are not available. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The ui.Dialog built-in class provides an interface to the BDL interactive dialog statements \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Such as CONSTRUCT and MENU \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Method }{\b\f1\fs36\cf2\lang3082 setActionActive}{\f1\fs36\cf2\lang3082  enables and disables actions \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 To call a method of this class, use the pre-defined }{\b\f1\fs36\cf2\lang3082 DIALOG}{\f1\fs36\cf2\lang3082  object within the interactive instruction block. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang1033  MENU\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang1033         BEFORE MENU\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang1033          CALL DIALOG.setActionActive("actionname" , state)\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang1033        ...\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2520 {\b\f1\fs28\cf5\lang1033      END MENU\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\i\f1\fs32\cf2\lang3082 State}{\b\f1\fs32\cf2\lang3082  is an integer, 0 (disable) or 1 (enable).}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You must be within an interactive instruction in order to use the DIALOG object in your program, but you can pass the object to a function.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Managing Actions}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The Close Action \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In Genero applications, when the user clicks the X button in the upper-right corner of the application window, a predefined }{\b\f1\fs36\cf2\lang3082 close}{\f1\fs36\cf2\lang3082  action is sent to the program.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 What happens next depends on the interactive dialog statement: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 When the program is in a MENU dialog statement, the }{\b\f1\fs32\cf2\lang3082 close}{\f1\fs32\cf2\lang3082  action is converted to an INTERRUPT key press. If there is a COMMAND KEY (INTERRUPT) block in the MENU statement, the statements in that control block are executed.\'a0Otherwise, no action is taken \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 When the program is in an INPUT, INPUT ARRAY, CONSTRUCT or DISPLAY ARRAY statement,\'a0 the }{\b\f1\fs32\cf2\lang3082 close}{\f1\fs32\cf2\lang3082  action cancels the dialog, and the }{\b\f1\fs32\cf2\lang3082 int_flag}{\f1\fs32\cf2\lang3082  is set to TRUE. Your program can check the value of }{\b\f1\fs32\cf2\lang3082 int_flag}{\f1\fs32\cf2\lang3082  and take appropriate action \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Change this default behavior by overwriting the }{\b\f1\fs36\cf2\lang3082 close}{\f1\fs36\cf2\lang3082  action within the interactive statement.\'a0For example, to exit the MENU statement when the user clicks this button: \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 MENU\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082      ...\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082      ON ACTION close\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082        EXIT MENU\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082      END MENU\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\f1\fs28\cf2\lang3082 By default the action view for the close action is hidden and does not display on the form}{\b\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Actions Defaults}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Action Defaults}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 MENU/Action Defaults Interaction}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Actions Defaults}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Action Defaults\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The Genero BDL runtime system includes an XML file, }{\b\f1\fs36\cf2\lang3082 default.4ad,\'a0}{\f1\fs36\cf2\lang3082  in the }{\b\f1\fs36\cf2\lang3082 lib}{\f1\fs36\cf2\lang3082  subdirectory of the installation directory FGLDIR, that defines presentation attributes for some commonly used actions. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If you match the action names used in this file exactly when you define your action views (TOOLBAR or TOPMENU items, buttons, etc.)\'a0 in the form specification file, the presentation attributes defined for this action will be used.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\ul\f1\fs36\cf2\lang3082 All action names must be in lower-case.\'a0}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 For example, the following line in the }{\b\f1\fs36\cf2\lang3082 default.4ad}{\f1\fs36\cf2\lang3082  file:\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\b\f1\fs28\cf5\lang3082 <ActionDefault name="find" text="Find" image="find" comment="Search" />\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Defines presentation attributes for a}{\b\f1\fs32\cf2\lang3082  find}{\f1\fs32\cf2\lang3082  action (the text to be displayed on the action view }{\b\f1\fs32\cf2\lang3082 find }{\f1\fs32\cf2\lang3082 defined in the form, the image file to be used as the icon for the action view, and the comment to be associated with the action view). \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1800 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The attribute values are case-sensitive \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Actions Defaults}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Action Defaults\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The following line in the }{\b\f1\fs36\cf2\lang3082 default.4ad}{\f1\fs36\cf2\lang3082  file defines presentation attributes for the pre-defined action }{\b\f1\fs36\cf2\lang3082 cancel}{\f1\fs36\cf2\lang3082 .\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 An accelerator key is assigned as an alternate means of invoking the action: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs28\cf5\lang3082 <ActionDefault name="cancel" text="Cancel" acceleratorName="Escape" />\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 You can override a default presentation attribute in your program. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 For example, by specifying a\'a0 TEXT attribute for the action }{\b\f1\fs32\cf2\lang3082 find}{\f1\fs32\cf2\lang3082  in the form specification file, the default TEXT value of "Find " is replaced with the value "Looking." \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang1033 03 TOPMENU\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang1033 04\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang1033 ...   \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang1033 07   GROUP stores (TEXT="Stores")\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\plain\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\b\f1\fs28\cf5\lang1033 COMMAND find (TEXT="Looking")\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can create your own .4ad file to standardize the presentation attributes for all the common actions used by your application \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Actions Defaults}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 MENU/Action Defaults Interaction \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The attributes of the action views for the MENU actions in the }{\b\f1\fs36\cf2\lang3082 custmain.4gl }{\f1\fs36\cf2\lang3082 example will be determined as shown in the table below \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Attributes defined in the form specification file override attributes defined in the }{\b\f1\fs36\cf2\lang3082 .4ad}{\f1\fs36\cf2\lang3082  file. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 GUI Options}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li540\fi-540 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 5.5\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Recompile the programs again and see the results at the GUI\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1170\fi-450 {\b\f1\fs36\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 6: Add/Update/Delete}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Add/Update/Delete}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Action Defaults\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This program allows the user to insert/update/delete rows in the customer table. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Embedded SQL statements (UPDATE/INSERT/DELETE) are used to update the table, based on the values stored in the program record \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 SQL transactions, and concurrency and consistency issues are discussed.\'a0Prior to deleting a row, a dialog window is displayed to prompt the user to verify the deletion.\'a0 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Entering Data on a Form}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic dicusses\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 Input Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 Unbuffered Attribute}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Without Defaults Attribute\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Entering Data on a Form}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 INPUT Statement \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The INPUT statement allows the user to enter or change the values in a program record, which can then be used as the data for new rows in a database table, or to update existing rows. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 In the INPUT statement you list:\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The program variables that are to receive data from the form\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The corresponding form fields that the user will use to supply the data \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang3082 INPUT <}{\b\i\f1\fs28\cf5\lang3082 program-variables>}{\b\f1\fs28\cf5\lang3082  FROM <}{\b\i\f1\fs28\cf5\lang3082 form-fields}{\b\f1\fs28\cf5\lang3082 > }{\b\f1\fs28\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The FROM clause explicitly binds the fields in the screen record to the program variables, so the INPUT instruction can manipulate values that the user enters in the screen record. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The number of record members must equal the number of fields listed in the FROM clause \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When the user enters data, the runtime system checks the entered value against the data type of the variable, not the data type of the screen field. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Entering Data on a Form}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 INPUT Statement \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When invoked, the INPUT statement enables the specified fields of the form in the current BDL window, and waits for the user to supply data for the fields. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The user moves the cursor from field to field and types new values \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Each time the cursor leaves a field, the value typed into that field is deposited into the corresponding program variable \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can write blocks of code as clauses in the INPUT statement that are called automatically during input, so you can monitor and control the actions of your user within this statement \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The INPUT statement ends when the user selects the accept or cancel actions, or the action is accepted programmatically \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 INPUT supports the same shortcuts for naming records as the DISPLAY statement You can ask for input to all members of a record, from all fields of a screen record, and you can ask for input BY NAME from fields that have the same names as the program variables \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang3082 INPUT BY NAME <}{\b\i\f1\fs28\cf5\lang3082 programrecord}{\b\f1\fs28\cf5\lang3082 >.* \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Entering Data on a Form}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 UNBUFFERED Attribute\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 By default, field values are buffered \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The UNBUFFERED attribute makes the INPUT dialog "sensitive," allowing you to easily change some form field values programmatically during INPUT execution \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When you assign a value to a program variable, the runtime system automatically displays that value in the form \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When you input values in a form field, the runtime system automatically stores that value in the corresponding program variable \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Using the UNBUFFERED attribute }{\ul\f1\fs36\cf2\lang3082 is recommended \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Entering Data on a Form}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 WITHOUT DEFAULTS Attribute\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The same INPUT statement can be used, with the WITHOUT DEFAULTS attribute, to allow the user to make changes to an existing program record representing a row in the database. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Attribute prevents BDL from automatically displaying any default values that have been defined for the form fields when INPUT is invoked, allowing you to display the existing database values on the screen before the user begins editing the data \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating Database Tables}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 SQL Transactions\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Concurrency and Consistency}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating Database Tables}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 SQL Transactions \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The values of the program variables that have been input through the form can be used in SQL statements that update tables in a database\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The embedded SQL statements INSERT, UPDATE, and DELETE can be used to make changes to the contents of a database table \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If your database has transaction logging, use the BEGIN WORK and COMMIT WORK commands to delimit a transaction block, usually consisting of multiple SQL statements \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 If you do not issue a BEGIN WORK statement to start a transaction, each statement executes within its own transaction \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\ul\f1\fs36\cf2\lang3082 To eliminate concurrency problems, keep transactions as short as possible \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating Database Tables}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Concurrency and Consistency\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 While your program is modifying data, another program may also be reading or modifying the same data \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 To prevent errors, many database servers use a system of locks. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When another program requests the data, the database server either makes the program wait or turns it back with an error \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 BDL provides a combination of statements to control the effect that locks have on your data access: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs32\cf2\lang3082 \tab }{\b\f1\fs32\cf5\lang3082 SET LOCK MODE TO \'7bWAIT [n]| NOT WAIT \'7d}{\f1\fs32\cf2\lang3082  }{\f1\fs32\cf2 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This defines the timeout for lock acquisition for the current connection \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The timeout period can be specified in seconds (}{\b\f1\fs32\cf2\lang3082 n}{\f1\fs32\cf2\lang3082 ).\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 \'a0If no period is specified, the timeout is infinite \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the LOCK MODE is set to NOT WAIT, an exception is returned immediately if a lock cannot be acquired \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs32\cf2\lang3082 \tab }{\b\f1\fs28\cf5\lang3082 SET ISOLATION LEVEL TO \'7b DIRTY READ | COMMITTED READ | CURSOR STABILITY | REPEATABLE READ \'7d}{\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This defines the ISOLATION LEVEL for the current connection.\'a0When possible, the database driver executes the native SQL statement that corresponds to the specified isolation level.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating Database Tables}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Concurrency and Consistency\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 For portable database programming, the following is recommended: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Transactions must be enabled in your database. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The ISOLATION LEVEL must be at least COMMITTED READ.\'a0 On most database servers, this is usually the default isolation level and need not be changed. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The LOCK MODE must be set to WAIT or WAIT <}{\i\f1\fs32\cf2\lang3082 timeperiod}{\f1\fs32\cf2\lang3082 >}{\b\f1\fs32\cf2\lang3082 ,\'a0}{\f1\fs32\cf2\lang3082  if this is supported by your database server.\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a New Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discussess\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 INPUT Statement Control Blocks\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a New Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 INPUT Statement Control Blocks\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Genero BDL provides some optional control blocks for the INPUT statement that are called automatically as the user moves the cursor through the fields of a form\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This allows your program to initialize field contents when adding a new row, for example, or to validate the user's input.\'a0For example:\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 BEFORE FIELD control blocks are executed immediately prior to the focus moving to the specified field.\'a0\'a0The example program uses this control block to prevent the user from changing the store number during an update by immediately moving the focus to the store name field (the NEXT FIELD instruction).\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 An ON CHANGE block is executed when the cursor leaves the specified field and the value was changed by the user since the field received the focus. This block is also fired when the user clicks on a checkbox, radiogroup, or changes the item in a combobox. The example program uses the ON CHANGE control block to verify the uniqueness of the store number that was entered, and to make sure that the store name is not left blank.\'a0\'a0 The user receives notification of a problem with the value of a field as soon as the field is exited. Validating these values as they are completed is less disruptive than notifying the user of several problems after the entire record has been entered. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a New Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 6.1\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Adding Menu options, and sql insert statement\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custmain.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at how to add menu options to update the rows in the database table }{\b\f1\fs24\cf2\lang3082 customer}{\f1\fs24\cf2\lang3082  }{\f1\fs24\cf5 \'85\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94.\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the new function, }{\b\f1\fs24\cf2\lang3082 inpupd_cust(), }{\f1\fs24\cf2\lang3082 to allow the user to input a new row into the form \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the new function, }{\b\f1\fs24\cf2\lang3082 insert_cust(), }{\f1\fs24\cf2\lang3082 containing the SQL statement to add the new row to the database table }{\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating an Existing Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Using a Work Record\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 SELECT ... FOR UPDATE \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 SCROLL CURSOR WITH HOLD\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating an Existing Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs36 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'95}}{\b\f1\fs36\cf1\lang3082 Using a Work Record\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 Updating an existing row in a database table provides more opportunity for concurrency and consistency errors that inserting a new row \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 A work record and a local record, both identical to the program record, are defined to allow the program to compare the values \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 A SCROLL CURSOR is used to allow the user to scroll through a result set generated by a query.\'a0The scroll cursor is declared WITH HOLD so it will not be closed when a COMMIT WORK or ROLLBACK WORK is executed. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 When the user chooses Update, the values in the current program record are copied to the work record. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The INPUT statement accepts the user's input and stores it in the program record.\'a0Use the WITHOUT DEFAULTS keywords to ensure that the original values retrieved from the database were not replaced with default values.\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 If the user accepts the input, a transaction is started with BEGIN WORK. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The primary key stored in the program record is used to SELECT the same row into the local record.\'a0FOR UPDATE locks the row. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The SQLCA.SQLCODE is checked, in case the database row was deleted after the initial query. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The work record and the local record are compared, in case the database row was changed after the initial query. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 If the work and local records are identical,\'a0 the database row is updated using the new program record values input by the user. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 If the UPDATE is successful, a COMMIT WORK is issued.\'a0Otherwise, a ROLLBACK WORK is issued. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 The SCROLL CURSOR has remained open, allowing the user to continue to scroll through the query result set. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating an Existing Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 SELECT ... FOR UPDATE \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 To explicitly lock a database row prior to updating, a SELECT ... FOR UPDATE statement may be used to instruct the database server to lock the row that was selected.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 SELECT ... FOR UPDATE cannot be used outside of an explicit transaction.\'a0The locks are held until the end of the transaction. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Updating an Existing Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 SCROLL CURSOR WITH HOLD \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Like many programs that perform database maintenance, the Query program uses a SCROLL CURSOR to move through an SQL result set, updating or deleting the rows as needed \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 BDL cursors are automatically closed by the database interface when a COMMIT WORK or ROLLBACK WORK statement is performed. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 the\'a0SCROLL CURSOR can be declared WITH HOLD, keeping it open across multiple transactions to allow the user to continue to scroll through the result set \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Adding a New Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 6.2\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Definition of a work record for updates\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the followinf definition:\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\b\f1\fs24\cf5\lang3082 DEFINE mr_custrec, work_custrec RECORD }{\b\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94.\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the function, }{\b\f1\fs24\cf2\lang3082 inpupd_cust(), }{\f1\fs24\cf2\lang3082 is modified to use a work record when updating an existing database row \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the new function, }{\b\f1\fs24\cf2\lang3082 insert_cust(), }{\f1\fs24\cf2\lang3082 containing the SQL statement to add the new row to the database table }{\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94.\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the function, }{\b\f1\fs24\cf2\lang3082 update_cust(), }{\f1\fs24\cf2\lang3082 uses a work record and SQL statements to update a row in the customer table \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Deleting a Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The SQL DELETE statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Prompting for Validation\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Deleting a Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The SQL DELETE statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The SQL DELETE statement can be used to delete rows from the database table \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The primary key of the row to be deleted can be obtained from the values in the program record. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 Example:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033    DELETE FROM customer \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033      WHERE store_num = mr_custrec.store_num}{\b\f1\fs32\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Deleting a Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Prompting for Validation \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The TRUE statement has an optional STYLE attribute that can be set to 'dialog', automatically opening a temporary modal window \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The menu options appear as buttons at the bottom of the window. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can also define a message and icon with the COMMENT and IMAGE attributes \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This provides a simple way to prompt the user to confirm some action or operation that has been selected \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Deleting a Row}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 6.3\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Way to delete a row\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the new function }{\b\f1\fs24\cf2\lang3082 delete_check() }{\f1\fs24\cf2\lang3082 to prompt for validation when deleting a row\'a0 from a database table }{\b\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson5\'94. There you will find the simple BDL program called \'93custquery.4gl\'94.\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at the new function }{\b\f1\fs24\cf2\lang3082 delete_cust()}{\f1\fs24\cf2\lang3082  containing SQL statements to delete the row from the customer table. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 Recompile the programs and test them again}{\f1\fs28\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 7: Display Multiple Rows (Array)}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Defininig the Form for the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\b\f1\fs32\cf1\lang3082 Display Array: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 In this section you will be able to display multiple customer records at once \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The program defines a program array to hold the records, and displays the records in a form containing a TABLE and a screen array..\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The user can scroll through the records in the table, sort the table by a specific column, and hide or display columns. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 In the illustration, the table is sorted by City.\'a0Right-clicking the mouse displays a drop-down list of the columns, with check boxes, allowing the user to hide or show a specific column. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 To implement this type of scrolling display, the example must:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Create a form specification containing a screen array of screen records \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Define an program array of records, each record having members that correspond to the fields of the screen records.}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Defining the Form for the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:}{\b\f1\fs32\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Screen Arrays\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 TABLE Containers\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The INSTRUCTIONS Section}{\b\f1\fs32\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Defining the Form for the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Screen Arrays\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A screen array is usually a repetitive array of fields in the LAYOUT section of a form specification, each containing identical groups of screen fields\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Each \'93row\'94 of a screen array is a screen record\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Each \'93column\'94 of a screen array consists of fields with the same item tag in the LAYOUT section of the form specification file. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You must declare screen arrays in the INSTRUCTIONS section\par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Table Containers\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The TABLE container in a form defines the presentation of a list of records, bound to a screen array \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 When this layout container is used with curly braces defining the container area, the position of the static labels and item tags is automatically detected by the form compiler to build a graphical object displaying a list of records. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The first line of the TABLE area\'a0contains text entries defining the column titles \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The second\'a0 line contains field item tags that define the columns of the table receiving the data. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs32 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'96}}{\f1\fs32\cf2\lang3082 The user can sort the rows displayed in the form table by a mouse-click on the title of the column that is to be used for the sort}{\f1\fs36\cf2\lang3082   \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Defining the Form for the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The INSTRUCTIONS Section  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You must declare a screen array in the INSTRUCTIONS section of the form\'a0with the SCREEN RECORD keyword.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can reference the names of the screen array}{\i\f1\fs36\cf2\lang3082  }{\f1\fs36\cf2\lang3082 in the\'a0DISPLAY ARRAY statement of\'a0the program. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Defining the Form for the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 7.1\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Defining a screen array in a Form Definition\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson6\'94. There you will find the simple BDL program called \'93menycust.per\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at ARRAY definition in the Form: TABLE}{\f1\fs24\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:}{\b\f1\fs32\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Program Arrays\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Loading the Array\'a0}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Program Arrays\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A program array\'a0 is an ordered set of elements all of the same data type. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You can create one-, two-, or three-dimensional arrays. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 elements of the array can be simple types or they can be records. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Arrays can be\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 static:\'a0defined with an explicit size for all dimensions\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 dynamic:\'a0has a variable size; dynamic arrays have no theoretical size limit}{\f1\fs28\cf2\lang3082 \'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 All elements of static arrays are initialized even if the array is not used \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Defining huge static arrays may use a lot of memory \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The elements of dynamic arrays are allocated automatically by the runtime system, as needed.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 To define a dynamic array}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033 \tab DEFINE cust_arr2 DYNAMIC ARRAY OF RECORD \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033        \tab              store_num LIKE customer.store_num,\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033        \tab              city      LIKE customer.city\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033        \tab END RECORD}{\b\f1\fs28\cf5\lang3082 \'a0\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs28\cf2\lang3082 The size of the array will be determined by the runtime system, based on the program logic that is written to fill the array.}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Loading the Array\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 To load the program array in the example, you must retrieve the values from the result set of a query and load them into the elements of the array\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The FOREACH statement is equivalent to using the OPEN, FETCH and CLOSE statements to retrieve and process all the rows selected by a query, and is especially useful when loading arrays. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 01     DECLARE custlist2_curs CURSOR FOR \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 02        SELECT store_num, city FROM customer \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 03     LET idx = 1\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 04     FOREACH custlist2_curs INTO cust_arr2[idx].*\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 05       LET idx = idx + 1\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033 06     END FOREACH\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The FOREACH statement shown above: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Opens the }{\b\f1\fs28\cf2\lang3082 custlist2_curs}{\f1\fs28\cf2\lang3082  cursor.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Fetches a row into the array }{\b\f1\fs28\cf2\lang3082 cust_arr2}{\f1\fs28\cf2\lang3082  using the variable }{\b\f1\fs28\cf2\lang3082 idx}{\f1\fs28\cf2\lang3082  as an index to indicate the element number of the array. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Increments }{\b\f1\fs28\cf2\lang3082 idx}{\f1\fs28\cf2\lang3082  by one. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Repeats steps 2 and 3 until no more rows are retrieved from the database table (automatically checks for the NOTFOUND condition).\'a0\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs28 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'95}}{\f1\fs28\cf2\lang3082 Closes the cursor and exits from the FOREACH loop.}{\f1\fs24\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs24\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Loading the Array\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You must DECLARE the cursor before the FOREACH statement can retrieve the rows \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Since the the index of the array element\'a0 is incremented prior to each FOREACH statement being executed (line 05), the FOREACH ... INTO <array_element> instruction causes an additional element to be allocated during the last FETCH returning NOTFOUND \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A built-in method (function) of the array object, }{\b\f1\fs36\cf2\lang3082 deleteElement}{\f1\fs36\cf2\lang3082 , can be used to remove the empty element from the array.}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033     IF (idx > 1) THEN \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033         CALL cust_arr2.deleteElement(idx)\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033         LET idx = idx -1\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang1033     END IF}{\f1\fs24\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Displaying the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:}{\b\f1\fs32\cf1\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The DISPLAY ARRAY Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 The ARR_CURR Function\'a0}{\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Displaying the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The DISPLAY ARRAY Statement\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The DISPLAY ARRAY statement lets the user view the contents of an array of records, scrolling through the display, but the user cannot change them\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Static ARRAY\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 When using a static array, the number of rows to be displayed is defined by the COUNT attribute. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If you do not use the }{\b\f1\fs32\cf2\lang3082 COUNT}{\f1\fs32\cf2\lang3082  attribute, the runtime system cannot determine how much data to display, and so the screen array remains empty.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Dynamic ARRAY\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 When using a dynamic array, the number of rows to be displayed is defined by the number of elements in the dynamic array; the }{\b\f1\fs32\cf2\lang3082 COUNT}{\f1\fs32\cf2\lang3082  attribute is ignored.\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 Example\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5\lang3082 DISPLAY ARRAY cust_arr2 TO sa_cust2.* ATTRIBUTES(COUNT=idx)\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This statement will display the program array cust_arr2 to the\'a0form fields defined in the sa_cust2 screen array of the form.\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 By default, the DISPLAY ARRAY statement does not terminate until the user accepts or cancels the dialog \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The Accept and Cancel actions are predefined and display on the form. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Displaying the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 The ARR_CURR Function\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 When the user accepts or cancels the dialog, the ARR_CURR built-in function returns the index (subscript number) of the row in the program array that was selected (the current row).\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This allows your program to determine the row that was selected and make use of the selected row's values. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Displaying the Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 7.2\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Displaying an array, allowing the user to select one row\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson6\'94. There you will find the simple BDL program called \'93cust_lib.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at ARRAY definition, you will learn how to display an array of rows from the customer database table on a form and allow the user to select one of the rows \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 cust_lib.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating a Library}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Creating a Library\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Since the cust_lib function that could be used by other programs that reference the }{\b\f1\fs36\cf2\lang3082 customer}{\f1\fs36\cf2\lang3082  table, the function will be compiled into a library.\'a0  \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The library can then be linked into any program, and the function called.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The function will always return }{\b\f1\fs32\cf2\lang3082 store_num}{\f1\fs32\cf2\lang3082  and s}{\b\f1\fs32\cf2\lang3082 tore_name}{\f1\fs32\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 If the FOREACH fails, or returns no rows, the calling program will have a }{\b\f1\fs32\cf2\lang3082 store_num}{\f1\fs32\cf2\lang3082  of zero and a blank }{\b\f1\fs32\cf2\lang3082 store_name}{\f1\fs32\cf2\lang3082  returned. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The function is contained in a file named }{\b\f1\fs36\cf2\lang3082 cust_lib.4gl}{\f1\fs36\cf2\lang3082 .\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 This file would usually contain additional library functions. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 To compile (and link, if there were additional .4gl files to be included in the library): \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\b\f1\fs28\cf5\lang3082 fgl2p -o cust_lib.42x cust_lib.4gl \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Since a library has no MAIN function, we will need to create a small stub program if we want to test the library function independently\par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Creating a Library}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 7.3\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Calling a library function from a different module\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson6\'94. There you will find the simple BDL program called \'93cust_stub.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at main function that will call the library or function display_custarr().\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Look mainly the compilation way and try it\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 cust_stub.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Paged Mode}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 This topic discusses:\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 Paged Mode of DISPLAY ARRAY \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 ON FILL BUFFER clause \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\plain\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\b\f1\fs36\cf2\lang3082 AFTER DISPLAY \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Paged Mode}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Paged Mode of DISPLAY ARRAY\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2 This option }{\f1\fs36\cf2\lang3082 retrieves all the rows from the customer table into the program array prior to the data being displayed by the DISPLAY ARRAY statement.  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Using this full list mode, you must copy into the array all the data you want to display \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Using the DISPLAY ARRAY statement in "paged" mode allows you to\'a0provide data rows dynamically during the dialog, using a dynamic array to hold one page of data. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 A "page" of data is the total number of\'a0 rows of data\'a0 that can be displayed in the form at one time. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The length of a page can change dynamically, since the user has the option of re-sizing the window containing the form. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Paged Mode}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 ON FILL BUFFER clause\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The ON FILL BUFFER clause feeds the DISPLAY ARRAY instruction with pages of data \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The following built-in functions are used in the ON FILL BUFFER clause to provide the rows of data for the page: \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 FGL_DIALOG_GETBUFFER START(): retrieves the offset in the\'a0SCROLL CURSOR result set, and is used to determine the starting point for retrieving and displaying the complete rows. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 FGL_DIALOG_GETBUFFERLENGTH(): retrieves the current length of the page, and is used to determine the number of rows that must be provided.\'a0\'a0}{\f1\fs36\cf2\lang3082  \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The statements in the ON FILL BUFFER clause of DISPLAY ARRAY are executed automatically by the runtime system each time a new page of data is needed \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 the statements in the ON FILL BUFFER clause will automatically maintain the dynamic array so that the relevant ten rows are retrieved and/or displayed as the user scrolls up and down through the table on the form \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Paged Mode}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 AFTER DISPLAY\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The }{\b\f1\fs36\cf2\lang3082 AFTER DISPLAY}{\f1\fs36\cf2\lang3082  block is executed one time, after the user has accepted or canceled the dialog, but before executing the next statement in the program \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 the statements in this block determine the current position of the cursor when the user clicked OK or Cancel, so the correct store number and name can be returned to the calling function. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Paged Mode}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 7.4\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Using page mode to display an array of database rows\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson6\'94. There you will find the simple BDL program called \'93cust_lib2.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at display_custarr() function, look the records in the customer table are loaded into the program array and the user uses the form to scroll through the program array. The user actually scrolls through the result set created by a\'a0 SCROLL CURSOR \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 This\'a0SCROLL CURSOR retrieves only the store number, and another SQL SELECT statement retrieves the remainder of the row as needed. \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2 See \'93}{\f1\fs28\cf2\lang3082 cust_lib2.rtf}{\f1\fs28\cf2 \'94 file to know the program meaning}{\f1\fs28\cf5 \par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\f1\fs28\cf5\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 Chapter 8: Input Multiple Rows}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Input Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Input Array: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This program uses a form and a screen array to allow the user to view and change multiple records of a program array at once \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The program uses the INPUT ARRAY statement, and its control blocks, to control and monitor the changes made by the user to the records \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 As each record in the program array is added, updated, or deleted,\'a0 the program logic makes corresponding changes in the rows of the }{\b\f1\fs36\cf2\lang3082 customer}{\f1\fs36\cf2\lang3082  database table.\'a0\'a0 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The example window shown below has been re-sized to fit on this page \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Input Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Input Array Statement: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The }{\b\f1\fs36\cf2\lang3082 INPUT ARRAY}{\f1\fs36\cf2\lang3082  statement supports data entry by users into a screen array, and stores the entered data in a program array of records \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 During the INPUT ARRAY execution, the user can edit or delete existing records, insert new records, and move inside the list of records \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The program can then use the INSERT, DELETE or UPDATE SQL statements to modify the appropriate database tables. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The INPUT ARRAY statement does not terminate until the user validates or cancels the dialog. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033      \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033     INPUT ARRAY cust_arr WITHOUT DEFAULTS FROM sa_cust.* \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs24\cf5\lang1033             ATTRIBUTE (UNBUFFERED, COUNT=idx)\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\b\f1\fs32\cf5 \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The example}{\b\f1\fs36\cf2\lang3082  INPUT ARRAY}{\f1\fs36\cf2\lang3082  statement binds the screen array fields in }{\b\f1\fs36\cf2\lang3082 sa_cust\'a0}{\f1\fs36\cf2\lang3082  to the member records of the program array }{\b\f1\fs36\cf2\lang3082 cust_arr}{\f1\fs36\cf2\lang3082 . \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The number of variables in each record of the program array must be the same as the number of fields in each screen record (that is, in a single row of the screen array). \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Each mapped variable must have the same data type or a compatible data type as the corresponding field}{\f1\fs28\cf2\lang3082  \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 The Unbuffered Attribute}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 UNBUFFERED attribute: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 As in the INPUT statement, when the UNBUFFERED attribute is used, the INPUT ARRAY statement is sensitive to program variable changes \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 You need to display new data during the execution, use the UNBUFFERED attribute and assign the values to the program array row; the runtime system automatically displays the values to the screen. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This sensitivity applies to ON ACTION control blocks, as well. \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Count and Other Attributes}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 COUNT and other attributes: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Some of the attributes of the INPUT ARRAY statement include:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The COUNT attribute of INPUT ARRAY defines the number of valid rows in the program array to be\'a0displayed as default rows. If you do not use the COUNT attribute, the runtime system cannot determine how much data to display, so the screen array remains empty. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The MAXCOUNT attribute defines the maximum number of data rows that can be entered in the program array. In a dynamic array, the user can enter an infinite number of rows if the MAXCOUNT attribute is not set. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The WITHOUT DEFAULTS attribute prevents BDL from displaying any default values that have been defined for form fields. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs32\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Control Blocks}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 Control Blocks: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Is possible to control and monitor the changes made by the user by using control blocks with the INPUT ARRAY statement:\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The BEFORE INPUT block: executed one time, before the runtime system gives control to the user. You can implement initialization in this block. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The BEFORE ROW block: executed each time the user moves to another row, after the destination row is made the current one. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The ON ROW CHANGE block: executed when the user moves to another row after modifications have been made to the current row. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The ON CHANGE <fieldname> block: executed when the cursor leaves a specified field and the value was changed by the user since the field got the focus. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The BEFORE INSERT block: executed each time the user inserts a new row in the array, before the new row is created and made the current one.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The AFTER INSERT block: executed each time the user inserts a new row in the array, after the new row is created. You can cancel the insert operation with the CANCEL INSERT keywords. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 The BEFORE DELETE block: executed each time the user deletes a row from the array, before the row is removed from the list. You can cancel the delete operation with the CANCEL DELETE}{\f1\fs36\cf2\lang3082  keywords. \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 ARR_CURR}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1\lang3082 ARR_CURR: \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 The language provides several built-in functions to use in an INPUT ARRAY statement. \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 ARR_CURR  tells us which array element is being changed \par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 This function returns the row number within the program array that is displayed in the current line of a screen array.\'a0 \par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\f1\fs36\cf2\lang3082 \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qr {\b\f1\fs48\cf1\lang1034 Input Array}{\b\f1\fs48\cf1\lang3082 \par 
}\pard\plain\ltrpar\s2\li1170\fi-450\fs56\lang2058\li600\fi-600 {\pntext\pard\plain\f1\fs40 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs40{\pntxtb \'95}}{\b\f1\fs40\cf1 LAB 8.1\par 
}\pard\plain\ltrpar\s3\li1800\fi-360\fs48\lang2058\li1260\fi-540 {\pntext\pard\f1\fs36 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs36{\pntxtb \'96}}{\f1\fs36\cf2\lang3082 Input Array sample\par 
}\pard\plain\ltrpar\s4\li2520\fi-360\fs40\lang2058\li1920\fi-480 {\pntext\pard\f1\fs32 \'95\tab}{\*\pn\pnlvlblt\pnf1\pnfs32{\pntxtb \'95}}{\f1\fs32\cf2\lang3082 Please follow the next instructions:\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 See folder \'93lesson6\'94. There you will find the simple BDL program called \'93custall.4gl\'94. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at load_custall() function, which loads the program array with rows from the customer database table \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at inpupd_custall() function, used to insert, delete, and change rows in the array on the form\par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Have a look at store_num_ok() function to verify that the store number does not already exist in the}{\b\f1\fs24\cf2\lang3082  customer}{\f1\fs24\cf2\lang3082  database table \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Review how to insert a new row in the customer database, using the values in the array on the form  }{\f1\fs24\cf2 \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Review how to update a row in the customer database, using the values in the array on the form. \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2\lang3082 Review how to how to delete a row in the customer database, using the values in the array on the form \par 
}\pard\plain\ltrpar\s6\li3960\fi-360\fs40\lang2058\li3240 {\pntext\pard\f1\fs24 \'bb\tab}{\*\pn\pnlvlblt\pnf1\pnfs24{\pntxtb \'bb}}{\f1\fs24\cf2 Review }{\f1\fs24\cf2\lang3082 the }{\b\f1\fs24\cf2\lang3082 custallform.per}{\f1\fs24\cf2\lang3082  form specification file containing a table and a screen record\par 
}\pard\plain\ltrpar\s5\li3240\fi-360\fs40\lang2058\li2580\fi-420 {\pntext\pard\f1\fs28 \'96\tab}{\*\pn\pnlvlblt\pnf1\pnfs28{\pntxtb \'96}}{\f1\fs28\cf2\lang3082 Compile and try \par 
}\pard\plain\ltrpar\s1\li540\fi-540\fs64\lang2058\li0\fi0\qc {\b\f1\fs48\cf1\lang1033 > Welcome to Genero developer world \'85\par 
}
}